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

How to use
checkFreed
method
in
org.postgresql.jdbc2.AbstractJdbc2BlobClob

Best Java code snippets using org.postgresql.jdbc2.AbstractJdbc2BlobClob.checkFreed (Showing top 12 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

public synchronized long length() throws SQLException
{
  checkFreed();
  return lo.size();
}
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: 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: 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

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

public synchronized long length() throws SQLException
{
  checkFreed();
  return lo.size();
}
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 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

/**
 * 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

/**
 * 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

/**
 * 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

/**
 * 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);
}
org.postgresql.jdbc2AbstractJdbc2BlobClobcheckFreed

Javadoc

Checks that this LOB hasn't been free()d already.

Popular methods of AbstractJdbc2BlobClob

  • assertPosition
    Throws an exception if the pos value exceeds the max value by which the large object API can index.
  • position
    Iterate over the buffer looking for the specified pattern

Popular in Java

  • Parsing JSON documents to java classes using gson
  • addToBackStack (FragmentTransaction)
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • Vector (java.util)
    The Vector class implements a growable array of objects. Like an array, it contains components that
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • BoxLayout (javax.swing)
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