org.axiondb.types
Class ByteArrayBlob

java.lang.Object
  extended by org.axiondb.types.ByteArrayBlob
All Implemented Interfaces:
Blob, AxionBlob

public class ByteArrayBlob
extends Object
implements AxionBlob

A Blob based upon a simple byte array.

Version:
$Revision: 1.2 $ $Date: 2003/05/14 22:28:40 $

Constructor Summary
ByteArrayBlob(byte[] value)
           
 
Method Summary
 InputStream getBinaryStream()
           
 byte[] getBytes()
           
 byte[] getBytes(long pos, int length)
           
 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)
           
 void truncate(long len)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ByteArrayBlob

public ByteArrayBlob(byte[] value)
Method Detail

getBinaryStream

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

getBytes

public byte[] getBytes()

getBytes

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

length

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

position

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

position

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

setBinaryStream

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

setBytes

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

setBytes

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

truncate

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