Save This Page
Home » jboss-5.0.0.CR1-src » org.jboss.ejb.plugins.cmp » jdbc » [javadoc | source]
org.jboss.ejb.plugins.cmp.jdbc
public final class: ByteArrayBlob [javadoc | source]
java.lang.Object
   org.jboss.ejb.plugins.cmp.jdbc.ByteArrayBlob

All Implemented Interfaces:
    Blob

The representation (mapping) in the JavaTM programming language of an SQL BLOB value to an array of bytes. A ByteArrayBlob contains an internal buffer that contains bytes that may be read from the stream. The Blob interface provides methods for getting the length of an SQL BLOB (Binary Large Object) value, for materializing a BLOB value on the client, and for determining the position of a pattern of bytes within a BLOB value. The ByteArrayBlob has static factory methods for construting an BLOB using either an existing serializable object, or an array of bytes. This is a nice way to store serialized objects in a relational field of type SQL BLOB.
Constructor:
 public ByteArrayBlob(byte[] bytes) 
Method from org.jboss.ejb.plugins.cmp.jdbc.ByteArrayBlob Summary:
free,   getBinaryStream,   getBinaryStream,   getBytes,   length,   position,   position,   setBinaryStream,   setBytes,   setBytes,   truncate
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.jboss.ejb.plugins.cmp.jdbc.ByteArrayBlob Detail:
 public  void free() throws SQLException 
 public InputStream getBinaryStream() throws SQLException 
 public InputStream getBinaryStream(long pos,
    long length) throws SQLException 
 public byte[] getBytes(long pos,
    int length) throws SQLException 
 public long length() throws SQLException 
 public long position(Blob pattern,
    long start) throws SQLException 
 public long position(byte[] pattern,
    long start) throws SQLException 
 public OutputStream setBinaryStream(long pos) throws SQLException 
 public int setBytes(long pos,
    byte[] bytes) throws SQLException 
 public int setBytes(long pos,
    byte[] bytes,
    int offset,
    int length) throws SQLException 
 public  void truncate(long length) throws SQLException