Codota Logo
AbstractJdbc2BlobClob
Code IndexAdd Codota to your IDE (free)

How to use
AbstractJdbc2BlobClob
in
org.postgresql.jdbc2

Best Java code snippets using org.postgresql.jdbc2.AbstractJdbc2BlobClob (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Charset c =
  • Codota IconString charsetName;Charset.forName(charsetName)
  • Codota IconCharset.defaultCharset()
  • Codota IconContentType contentType;contentType.getCharset()
  • Smart code suggestions by Codota
}
origin: postgresql/postgresql

/**
 * Throws an exception if the pos value exceeds the max value by
 * which the large object API can index.
 * 
 * @param pos Position to write at.
 */
protected void assertPosition(long pos) throws SQLException
{
  assertPosition(pos, 0);
}
origin: postgresql/postgresql

public synchronized long length() throws SQLException
{
  checkFreed();
  return lo.size();
}
origin: postgresql/postgresql

/**
 * This is simply passing the byte value of the pattern Blob
 */
public synchronized long position(Blob pattern, long start) throws SQLException
{
  return position(pattern.getBytes(1, (int)pattern.length()), start);
}
origin: postgresql/postgresql

public synchronized byte[] getBytes(long pos, int length) throws SQLException
{
  assertPosition(pos);
  lo.seek((int)(pos-1), LargeObject.SEEK_SET);
  return lo.read(length);
}
origin: postgresql/postgresql

public synchronized InputStream getBinaryStream() throws SQLException
{
  checkFreed();
  LargeObject subLO = lo.copy();
  subLOs.add(subLO);
  subLO.seek(0, LargeObject.SEEK_SET);
  return subLO.getInputStream();
}
origin: org.ancoron.postgresql/org.postgresql

/**
 * This is simply passing the byte value of the pattern Blob
 */
public synchronized long position(Blob pattern, long start) throws SQLException
{
  return position(pattern.getBytes(1, (int)pattern.length()), start);
}
origin: postgresql/postgresql

public synchronized OutputStream setBinaryStream(long pos) throws SQLException
{
  assertPosition(pos);
  LargeObject subLO = lo.copy();
  subLOs.add(subLO);
  subLO.seek((int)(pos-1));
  return subLO.getOutputStream();
}
origin: postgresql/postgresql

/**
 * Throws an exception if the pos value exceeds the max value by
 * which the large object API can index.
 * 
 * @param pos Position to write at.
 * @param len number of bytes to write.
 */
protected void assertPosition(long pos, long len) throws SQLException
{
  checkFreed();
  if (pos < 1)
  {
    throw new PSQLException(GT.tr("LOB positioning offsets start at 1."), PSQLState.INVALID_PARAMETER_VALUE);
  }
  if (pos + len - 1 > Integer.MAX_VALUE)
  {
    throw new PSQLException(GT.tr("PostgreSQL LOBs can only index to: {0}", new Integer(Integer.MAX_VALUE)), PSQLState.INVALID_PARAMETER_VALUE);
  }
}
origin: org.ancoron.postgresql/org.postgresql.osgi

/**
 * This is simply passing the byte value of the pattern Blob
 */
public synchronized long position(Blob pattern, long start) throws SQLException
{
  return position(pattern.getBytes(1, (int)pattern.length()), start);
}
origin: postgresql/postgresql

assertPosition(start, pattern.length);
origin: postgresql/postgresql

/**
 * For Blobs this should be in bytes while for Clobs it should be
 * in characters.  Since we really haven't figured out how to handle
 * character sets for Clobs the current implementation uses bytes for
 * both Blobs and Clobs.
 */
public synchronized void truncate(long len) throws SQLException
{
  checkFreed();
  if (!conn.haveMinimumServerVersion("8.3"))
    throw new PSQLException(GT.tr("Truncation of large objects is only implemented in 8.3 and later servers."), PSQLState.NOT_IMPLEMENTED);
  if (len < 0)
  {
    throw new PSQLException(GT.tr("Cannot truncate LOB to a negative length."), PSQLState.INVALID_PARAMETER_VALUE);
  }
  if (len > Integer.MAX_VALUE)
  {
    throw new PSQLException(GT.tr("PostgreSQL LOBs can only index to: {0}", new Integer(Integer.MAX_VALUE)), PSQLState.INVALID_PARAMETER_VALUE);
  }
  lo.truncate((int)len);
}
origin: org.ancoron.postgresql/org.postgresql.osgi

/**
 * Throws an exception if the pos value exceeds the max value by
 * which the large object API can index.
 * 
 * @param pos Position to write at.
 */
protected void assertPosition(long pos) throws SQLException
{
  assertPosition(pos, 0);
}
origin: org.ancoron.postgresql/org.postgresql.osgi

public synchronized long length() throws SQLException
{
  checkFreed();
  return lo.size();
}
origin: org.ancoron.postgresql/org.postgresql

/**
 * Throws an exception if the pos value exceeds the max value by
 * which the large object API can index.
 * 
 * @param pos Position to write at.
 */
protected void assertPosition(long pos) throws SQLException
{
  assertPosition(pos, 0);
}
origin: org.ancoron.postgresql/org.postgresql

public synchronized long length() throws SQLException
{
  checkFreed();
  return lo.size();
}
origin: org.ancoron.postgresql/org.postgresql

public synchronized byte[] getBytes(long pos, int length) throws SQLException
{
  assertPosition(pos);
  lo.seek((int)(pos-1), LargeObject.SEEK_SET);
  return lo.read(length);
}
origin: org.ancoron.postgresql/org.postgresql

public synchronized InputStream getBinaryStream() throws SQLException
{
  checkFreed();
  LargeObject subLO = lo.copy();
  subLOs.add(subLO);
  subLO.seek(0, LargeObject.SEEK_SET);
  return subLO.getInputStream();
}
origin: org.ancoron.postgresql/org.postgresql.osgi

public synchronized byte[] getBytes(long pos, int length) throws SQLException
{
  assertPosition(pos);
  lo.seek((int)(pos-1), LargeObject.SEEK_SET);
  return lo.read(length);
}
origin: org.ancoron.postgresql/org.postgresql.osgi

public synchronized InputStream getBinaryStream() throws SQLException
{
  checkFreed();
  LargeObject subLO = lo.copy();
  subLOs.add(subLO);
  subLO.seek(0, LargeObject.SEEK_SET);
  return subLO.getInputStream();
}
origin: org.ancoron.postgresql/org.postgresql

public synchronized OutputStream setBinaryStream(long pos) throws SQLException
{
  assertPosition(pos);
  LargeObject subLO = lo.copy();
  subLOs.add(subLO);
  subLO.seek((int)(pos-1));
  return subLO.getOutputStream();
}
org.postgresql.jdbc2AbstractJdbc2BlobClob

Javadoc

This class holds all of the methods common to both Blobs and Clobs.

Most used methods

  • assertPosition
    Throws an exception if the pos value exceeds the max value by which the large object API can index.
  • checkFreed
    Checks that this LOB hasn't been free()d already.
  • position
    Iterate over the buffer looking for the specified pattern

Popular in Java

  • Start an intent from android
  • startActivity (Activity)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • onRequestPermissionsResult (Fragment)
  • DecimalFormat (java.text)
    DecimalFormat is a concrete subclass ofNumberFormat that formats decimal numbers. It has a variety o
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • Hashtable (java.util)
    Hashtable is a synchronized implementation of Map. All optional operations are supported.Neither key
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now