biz.c24.io.api.data
Class SQLBlob

java.lang.Object
  extended by biz.c24.io.api.data.SQLBlob
All Implemented Interfaces:
Blob

public class SQLBlob
extends Object
implements Blob

An object representing a SQL BLOB (Binary Large OBject).

Warning: Serialized objects of this class or of a deployed class which is derived from it may not be compatible with future releases of C24 Integreation Objects. The current serialization support is appropriate for short term storage or RMI between applications running the same version of C24 Integreation Objects.

See Also:
SQLClobDataType

Constructor Summary
SQLBlob()
          Constructs a new instance.
SQLBlob(byte[] value)
          Constructs a new instance from the specified value.
 
Method Summary
 boolean equals(Object obj)
           
 void free()
          Releases the underlying data.
 InputStream getBinaryStream()
           
 InputStream getBinaryStream(long pos, long length)
          Retrieves the value as a stream from the specified position.
 byte[] getBytes(long pos, int length)
           
 int hashCode()
           
 long length()
           
 long position(Blob pattern, long start)
           
 long position(byte[] pattern, long start)
           
 OutputStream setBinaryStream(long pos)
           
 int setBytes(long pos, byte[] bytes)
           
 int setBytes(long pos, byte[] bytes, int offset, int len)
           
 String toString()
           
 void truncate(long len)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SQLBlob

public SQLBlob()
Constructs a new instance.


SQLBlob

public SQLBlob(byte[] value)
Constructs a new instance from the specified value.

Parameters:
value - The byte array to use.
Method Detail

length

public long length()
            throws SQLException
Specified by:
length in interface Blob
Throws:
SQLException

truncate

public void truncate(long len)
              throws SQLException
Specified by:
truncate in interface Blob
Throws:
SQLException

getBytes

public byte[] getBytes(long pos,
                       int length)
                throws SQLException
Specified by:
getBytes in interface Blob
Throws:
SQLException

setBytes

public int setBytes(long pos,
                    byte[] bytes)
             throws SQLException
Specified by:
setBytes in interface Blob
Throws:
SQLException

setBytes

public int setBytes(long pos,
                    byte[] bytes,
                    int offset,
                    int len)
             throws SQLException
Specified by:
setBytes in interface Blob
Throws:
SQLException

position

public long position(byte[] pattern,
                     long start)
              throws SQLException
Specified by:
position in interface Blob
Throws:
SQLException

getBinaryStream

public InputStream getBinaryStream()
                            throws SQLException
Specified by:
getBinaryStream in interface Blob
Throws:
SQLException

getBinaryStream

public InputStream getBinaryStream(long pos,
                                   long length)
Retrieves the value as a stream from the specified position.

Specified by:
getBinaryStream in interface Blob
Parameters:
pos - The position to retrieve the data from.
length - The length of the desired stream.
Returns:
A stream containing the BLOB data.

setBinaryStream

public OutputStream setBinaryStream(long pos)
                             throws SQLException
Specified by:
setBinaryStream in interface Blob
Throws:
SQLException

position

public long position(Blob pattern,
                     long start)
              throws SQLException
Specified by:
position in interface Blob
Throws:
SQLException

free

public void free()
Releases the underlying data.

Specified by:
free in interface Blob

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


C24 Technologies © 2002-2012: All Rights Reserved.