## org.h2.jdbc
Class JdbcBlob

    java.lang.Object
      org.h2.message.TraceObject
          org.h2.jdbc.JdbcBlob

All Implemented Interfaces:
  java.sql.Blob

    public class JdbcBlob

extends TraceObject
implements java.sql.Blob

Represents a BLOB value.

Field Summary

Fields inherited from class org.h2.message.TraceObject
`ARRAY, BLOB, CALLABLE_STATEMENT, CLOB, CONNECTION, DATA_SOURCE, DATABASE_META_DATA, PARAMETER_META_DATA, PREPARED_STATEMENT, RESULT_SET, RESULT_SET_META_DATA, SAVEPOINT, SQL_EXCEPTION, STATEMENT, XA_DATA_SOURCE, XID`

Constructor Summary
`JdbcBlob(JdbcConnection conn, Value value, int id)` INTERNAL

Method Summary
`void` `free()` Release all resources of this object.
`java.io.InputStream` `getBinaryStream()` Returns the input stream.
`java.io.InputStream` `getBinaryStream(long pos, long length)` [Not supported] Returns the input stream, starting from an offset.
`byte[]` `getBytes(long pos, int length)` Returns some bytes of the object.
`long` `length()` Returns the length.
`long` `position(java.sql.Blob blobPattern, long start)` [Not supported] Searches a pattern and return the position.
`long` `position(byte[] pattern, long start)` [Not supported] Searches a pattern and return the position.
`java.io.OutputStream` `setBinaryStream(long pos)` [Not supported] Returns an output stream.
`int` `setBytes(long pos, byte[] bytes)` [Not supported] Sets some bytes of the object.
`int` `setBytes(long pos, byte[] bytes, int offset, int len)` [Not supported] Sets some bytes of the object.
`java.lang.String` `toString()` INTERNAL
`void` `truncate(long len)` [Not supported] Truncates the object.

Methods inherited from class org.h2.message.TraceObject
`debugCode, debugCodeAssign, debugCodeCall, debugCodeCall, debugCodeCall, getNextId, getTrace, getTraceId, getTraceObjectName, isDebugEnabled, isInfoEnabled, logAndConvert, quote, quoteArray, quoteBigDecimal, quoteBytes, quoteDate, quoteIntArray, quoteMap, quoteTime, quoteTimestamp, setTrace, setTrace, toString, unsupported`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### JdbcBlob

    public JdbcBlob(JdbcConnection conn,
                    Value value,
                    int id)

  INTERNAL

Method Detail

### length

    public long length()
                throws java.sql.SQLException

  Returns the length.

  Specified by:
    `length` in interface `java.sql.Blob`
  Returns:
    the length
  Throws:
    `java.sql.SQLException`

### truncate

    public void truncate(long len)
                  throws java.sql.SQLException

  [Not supported] Truncates the object.

  Specified by:
    `truncate` in interface `java.sql.Blob`
  Parameters:
    `len` - the new length
  Throws:
    `java.sql.SQLException`

### getBytes

    public byte[] getBytes(long pos,
                           int length)
                    throws java.sql.SQLException

  Returns some bytes of the object.

  Specified by:
    `getBytes` in interface `java.sql.Blob`
  Parameters:
    `pos` - the index, the first byte is at position 1
    `length` - the number of bytes
  Returns:
    the bytes, at most length bytes
  Throws:
    `java.sql.SQLException`

### setBytes

    public int setBytes(long pos,
                        byte[] bytes)
                 throws java.sql.SQLException

  [Not supported] Sets some bytes of the object.

  Specified by:
    `setBytes` in interface `java.sql.Blob`
  Parameters:
    `pos` - the write position
    `bytes` - the bytes to set
  Returns:
    how many bytes have been written
  Throws:
    `java.sql.SQLException`

### setBytes

    public int setBytes(long pos,
                        byte[] bytes,
                        int offset,
                        int len)
                 throws java.sql.SQLException

  [Not supported] Sets some bytes of the object.

  Specified by:
    `setBytes` in interface `java.sql.Blob`
  Parameters:
    `pos` - the write position
    `bytes` - the bytes to set
    `offset` - the bytes offset
    `len` - the number of bytes to write
  Returns:
    how many bytes have been written
  Throws:
    `java.sql.SQLException`

### getBinaryStream

    public java.io.InputStream getBinaryStream()
                                        throws java.sql.SQLException

  Returns the input stream.

  Specified by:
    `getBinaryStream` in interface `java.sql.Blob`
  Returns:
    the input stream
  Throws:
    `java.sql.SQLException`

### setBinaryStream

    public java.io.OutputStream setBinaryStream(long pos)
                                         throws java.sql.SQLException

  [Not supported] Returns an output stream.

  Specified by:
    `setBinaryStream` in interface `java.sql.Blob`
  Parameters:
    `pos` - where to start writing
  Returns:
    the output stream to write into
  Throws:
    `java.sql.SQLException`

### position

    public long position(byte[] pattern,
                         long start)
                  throws java.sql.SQLException

  [Not supported] Searches a pattern and return the position.

  Specified by:
    `position` in interface `java.sql.Blob`
  Parameters:
    `pattern` - the pattern to search
    `start` - the index, the first byte is at position 1
  Returns:
    the position (first byte is at position 1), or -1 for not found
  Throws:
    `java.sql.SQLException`

### position

    public long position(java.sql.Blob blobPattern,
                         long start)
                  throws java.sql.SQLException

  [Not supported] Searches a pattern and return the position.

  Specified by:
    `position` in interface `java.sql.Blob`
  Parameters:
    `blobPattern` - the pattern to search
    `start` - the index, the first byte is at position 1
  Returns:
    the position (first byte is at position 1), or -1 for not found
  Throws:
    `java.sql.SQLException`

### free

    public void free()

  Release all resources of this object.

### getBinaryStream

    public java.io.InputStream getBinaryStream(long pos,
                                               long length)
                                        throws java.sql.SQLException

  [Not supported] Returns the input stream, starting from an offset.

  Parameters:
    `pos` - where to start reading
    `length` - the number of bytes that will be read
  Returns:
    the input stream to read
  Throws:
    `java.sql.SQLException`

### toString

    public java.lang.String toString()

  INTERNAL

  Overrides:
    `toString` in class `java.lang.Object`