Mimer JDBC Engine 2.12

com.mimer.jdbc
Class Blob

java.lang.Object
  |
  +--com.mimer.jdbc.Blob
All Implemented Interfaces:
Blob

public final class Blob
extends Object
implements Blob

The Blob object corresponds to a BLOB LOCATOR in the SQL-99 standard. This object may only be used to represent the Mimer SQL type BINARY LARGE OBJECT (BLOB). Any attempts to use this object on other datatypes will cause an SQLException to be raised. For more information see Blob .


Method Summary
 InputStream getBinaryStream()
          Returns an InputStream to access the data this BLOB LOCATOR represents.
 byte[] getBytes(long pos, int length)
          Returns a byte array holding the data this BLOB LOCATOR object represents.
 long length()
          Returns the length of the data this BLOB LOCATOR represents.
 long position(Blob pattern, long start)
          Searches for a position within the BLOB object.
 long position(byte[] pattern, long start)
          Searches for a position within the BLOB object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.sql.Blob
setBinaryStream, setBytes, setBytes, truncate
 

Method Detail

getBinaryStream

public InputStream getBinaryStream()
                            throws SQLException
Returns an InputStream to access the data this BLOB LOCATOR represents.

Specified by:
getBinaryStream in interface Blob
Returns:
A stream.
Throws:
SQLException - if an error occurs. SQLSTATE 25000 is thrown if this Blob object was invalidated because the transaction in which it was created has ended.

getBytes

public byte[] getBytes(long pos,
                       int length)
                throws SQLException
Returns a byte array holding the data this BLOB LOCATOR object represents.

Specified by:
getBytes in interface Blob
Parameters:
pos - The offset within the BLOB to start returning data.
length - The number of bytes at most to return.
Returns:
The string.
Throws:
SQLException - if an error occurs. SQLSTATE 25000 is thrown if this Blob object was invalidated because the transaction in which it was created has ended.

length

public long length()
            throws SQLException
Returns the length of the data this BLOB LOCATOR represents.

Specified by:
length in interface Blob
Returns:
The length in bytes.
Throws:
SQLException - if an error occurs. SQLSTATE 25000 is thrown if this Blob object was invalidated because the transaction in which it was created has ended.

position

public long position(Blob pattern,
                     long start)
              throws SQLException
Searches for a position within the BLOB object.

Searches within BLOB:s are not supported yet.

Specified by:
position in interface Blob
SQLException

position

public long position(byte[] pattern,
                     long start)
              throws SQLException
Searches for a position within the BLOB object.

Searches within BLOB:s are not supported yet.

Specified by:
position in interface Blob
SQLException

Mimer JDBC Engine 2.12

Submit a comment or suggestion Version 2.12 of Mimer JDBC Engine
Copyright Upright Database Technology AB, Box 1713, SE-751 47 UPPSALA, Sweden. All Rights Reserved.