|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Blob
Provides access to BLOBs, which are Binary Large OBjects. Consider accessing
Blobs within a transaction scope,
to prevent unexpected updates.
Clob| Method Summary | |
|---|---|
String |
asString()
Convenience method to capture all the Blob data as a single String, assuming UTF-8 encoding. |
String |
asString(Charset charset)
Convenience method to capture all the Blob data as a single String, decoded against the given charset. |
String |
asString(String charsetName)
Convenience method to capture all the Blob data as a single String, decoded against the given charset. |
long |
getLength()
Returns the length of this Blob, in bytes. |
InputStream |
openInputStream()
Returns an InputStream for reading Blob data positioned at the start. |
InputStream |
openInputStream(long pos)
Returns an InputStream for reading Blob data. |
InputStream |
openInputStream(long pos,
int bufferSize)
Returns an InputStream for reading Blob data. |
OutputStream |
openOutputStream()
Returns an OutputStream for writing Blob data, positioned at the start. |
OutputStream |
openOutputStream(long pos)
Returns an OutputStream for writing Blob data. |
OutputStream |
openOutputStream(long pos,
int bufferSize)
Returns an OutputStream for writing Blob data. |
void |
setLength(long length)
Set the length of this Blob, in bytes. |
void |
setValue(String value)
Convenience method to overwrite all Blob data with the value of a single String, applying UTF-8 encoding. |
void |
setValue(String value,
Charset charset)
Convenience method to overwrite all Blob data with the value of a single String, applying the given charset encoding. |
void |
setValue(String value,
String charsetName)
Convenience method to overwrite all Blob data with the value of a single String, applying the given charset encoding. |
| Methods inherited from interface com.amazon.carbonado.lob.Lob |
|---|
equals, getLocator |
| Method Detail |
|---|
InputStream openInputStream()
throws FetchException
IllegalArgumentException - if position is negative
FetchException
InputStream openInputStream(long pos)
throws FetchException
pos - desired zero-based position to read from
IllegalArgumentException - if position is negative
FetchException
InputStream openInputStream(long pos,
int bufferSize)
throws FetchException
pos - desired zero-based position to read frombufferSize - suggest that the input stream buffer be at least this large (in bytes)
IllegalArgumentException - if position is negative
FetchException
long getLength()
throws FetchException
FetchException
String asString()
throws FetchException
IllegalArgumentException - if resulting String length would be
greater than Integer.MAX_VALUE
OutOfMemoryError - if not enough memory to hold Blob as a single String
FetchException
String asString(String charsetName)
throws FetchException
charsetName - name of character set to decode String
IllegalCharsetNameException - if the given charset name is illegal
IllegalArgumentException - if resulting String length would be
greater than Integer.MAX_VALUE
OutOfMemoryError - if not enough memory to hold Blob as a single String
FetchException
String asString(Charset charset)
throws FetchException
charset - character set to decode String
IllegalArgumentException - if resulting String length would be
greater than Integer.MAX_VALUE
OutOfMemoryError - if not enough memory to hold Blob as a single String
FetchException
OutputStream openOutputStream()
throws PersistException
IllegalArgumentException - if position is negative
PersistException
OutputStream openOutputStream(long pos)
throws PersistException
pos - desired zero-based position to write to
IllegalArgumentException - if position is negative
PersistException
OutputStream openOutputStream(long pos,
int bufferSize)
throws PersistException
pos - desired zero-based position to write tobufferSize - suggest that the output stream buffer be at least this large (in bytes)
IllegalArgumentException - if position is negative
PersistException
void setLength(long length)
throws PersistException
length - new length to set to
IllegalArgumentException - if length is negative
PersistDeniedException - if Blob is read-only
PersistException
void setValue(String value)
throws PersistException
value - Blob is overwritten with this value
IllegalArgumentException - if value is null
PersistException
void setValue(String value,
String charsetName)
throws PersistException
value - Blob is overwritten with this valuecharsetName - name of character set to encode String
IllegalCharsetNameException - if the given charset name is illegal
IllegalArgumentException - if value is null
PersistException
void setValue(String value,
Charset charset)
throws PersistException
value - Blob is overwritten with this valuecharset - character set to encode String
IllegalArgumentException - if value is null
PersistException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||