org.mycore.backend.hibernate.tables
Class MCRBlob

java.lang.Object
  extended by org.mycore.backend.hibernate.tables.MCRBlob
All Implemented Interfaces:
Blob

public class MCRBlob
extends Object
implements Blob


Field Summary
(package private)  byte[] data
           
 
Constructor Summary
MCRBlob(byte[] data)
           
 
Method Summary
 void free()
           
 InputStream getBinaryStream()
           
 InputStream getBinaryStream(long pos, long length)
           
static byte[] getBytes(Blob blob)
           
 byte[] getBytes(long pos, int length)
           
 long length()
           
 long position(Blob pattern, long start)
           
 long position(byte[] pattern, long start)
           
 OutputStream setBinaryStream(long l)
           
 int setBytes(long l, byte[] a)
           
 int setBytes(long l, byte[] a, int u, int v)
           
 void truncate(long l)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

data

byte[] data
Constructor Detail

MCRBlob

MCRBlob(byte[] data)
Method Detail

getBinaryStream

public InputStream getBinaryStream()
Specified by:
getBinaryStream in interface Blob

setBinaryStream

public OutputStream setBinaryStream(long l)
Specified by:
setBinaryStream in interface Blob

setBytes

public int setBytes(long l,
                    byte[] a,
                    int u,
                    int v)
Specified by:
setBytes in interface Blob

setBytes

public int setBytes(long l,
                    byte[] a)
Specified by:
setBytes in interface Blob

truncate

public void truncate(long l)
Specified by:
truncate in interface Blob

getBytes

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

length

public long length()
Specified by:
length in interface Blob

position

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

position

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

getBytes

public static byte[] getBytes(Blob blob)

free

public void free()
          throws SQLException
Throws:
SQLException

getBinaryStream

public InputStream getBinaryStream(long pos,
                                   long length)
                            throws SQLException
Throws:
SQLException