|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.derby.iapi.types.HarmonySerialBlob
public class HarmonySerialBlob
Copied from the Harmony project's implementation of javax.sql.rowset.serial.SerialBlob at subversion revision 946981.
| Field Summary | |
|---|---|
private java.sql.Blob |
blob
|
private byte[] |
buf
|
private long |
len
|
private long |
origLen
|
private static long |
serialVersionUID
|
| Constructor Summary | |
|---|---|
HarmonySerialBlob(java.sql.Blob blob)
Constructs an instance by the given blob |
|
HarmonySerialBlob(byte[] buf)
Constructs an instance by the given buf |
|
| Method Summary | |
|---|---|
void |
free()
|
java.io.InputStream |
getBinaryStream()
Returns an input stream of this SerialObject. |
java.io.InputStream |
getBinaryStream(long pos,
long length)
|
byte[] |
getBytes(long pos,
int length)
Returns a copied array of this SerialObject, starting at the pos with the given length number. |
long |
length()
Gets the number of bytes in this SerialBlob object. |
static java.sql.SQLException |
makeSQLException(java.lang.String messageID,
java.lang.Object[] args)
Create a SQLException from Derby message arguments. |
private boolean |
match(byte[] bytes,
int start,
byte[] subBytes)
|
long |
position(java.sql.Blob pattern,
long start)
Search for the position in this Blob at which a specified pattern begins, starting at a specified position within the Blob. |
long |
position(byte[] pattern,
long start)
Search for the position in this Blob at which the specified pattern begins, starting at a specified position within the Blob. |
java.io.OutputStream |
setBinaryStream(long pos)
|
int |
setBytes(long pos,
byte[] theBytes)
|
int |
setBytes(long pos,
byte[] theBytes,
int offset,
int length)
|
void |
truncate(long length)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final long serialVersionUID
private byte[] buf
private java.sql.Blob blob
private long len
private long origLen
| Constructor Detail |
|---|
public HarmonySerialBlob(java.sql.Blob blob)
throws java.sql.SQLException
blob
blob - the given blob
java.sql.SQLException - if an error is encountered during serialization
java.sql.SQLException - if blob is nullpublic HarmonySerialBlob(byte[] buf)
buf
buf - the given buffer
java.sql.SQLException - if an error is encountered during serialization
java.sql.SQLException - if a SQL error is encountered| Method Detail |
|---|
public java.io.InputStream getBinaryStream()
throws java.sql.SQLException
getBinaryStream in interface java.sql.Blobjava.sql.SQLException - if an error is encountered
public byte[] getBytes(long pos,
int length)
throws java.sql.SQLException
pos with the given length number. If
pos + length - 1 is larger than the length
of this SerialObject array, the length will be shortened
to the length of array - pos + 1.
getBytes in interface java.sql.Blobpos - the starting position of the array to be copied.length - the total length of bytes to be copied
java.sql.SQLException - if an error is encountered
public long length()
throws java.sql.SQLException
length in interface java.sql.Blobjava.sql.SQLException - if an error is encoutnered
public long position(java.sql.Blob pattern,
long start)
throws java.sql.SQLException
position in interface java.sql.Blobpattern - a Blob containing the pattern of data to search for in this
Blobstart - the position within this Blob to start the search, where the
first position in the Blob is 1
java.sql.SQLException - if an error occurs accessing the Blob
java.sql.SQLException - if an error is encountered
public long position(byte[] pattern,
long start)
throws java.sql.SQLException
position in interface java.sql.Blobpattern - a byte array containing the pattern of data to search for in
this Blobstart - the position within this Blob to start the search, where the
first position in the Blob is 1
java.sql.SQLException - if an error is encountered
java.sql.SQLException - if an error occurs accessing the Blob
private boolean match(byte[] bytes,
int start,
byte[] subBytes)
public java.io.OutputStream setBinaryStream(long pos)
throws java.sql.SQLException
setBinaryStream in interface java.sql.Blobjava.sql.SQLException
public int setBytes(long pos,
byte[] theBytes)
throws java.sql.SQLException
setBytes in interface java.sql.Blobjava.sql.SQLException
public int setBytes(long pos,
byte[] theBytes,
int offset,
int length)
throws java.sql.SQLException
setBytes in interface java.sql.Blobjava.sql.SQLException
public void truncate(long length)
throws java.sql.SQLException
truncate in interface java.sql.Blobjava.sql.SQLException
public void free()
throws java.sql.SQLException
free in interface java.sql.Blobjava.sql.SQLException
public java.io.InputStream getBinaryStream(long pos,
long length)
throws java.sql.SQLException
getBinaryStream in interface java.sql.Blobjava.sql.SQLException
public static java.sql.SQLException makeSQLException(java.lang.String messageID,
java.lang.Object[] args)
|
Built on Wed 2013-06-12 15:21:56+0000, from revision ??? | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||