public class ByteArrayBlob extends AbstractBlob
| Constructor and Description | 
|---|
| ByteArrayBlob(byte[] data)Construct a ByteArrayBlob initially backed by the given byte array. | 
| ByteArrayBlob(byte[] data,
             int length)Construct a ByteArrayBlob initially backed by the given byte array. | 
| ByteArrayBlob(int capacity)Construct a ByteArrayBlob with the given initial capacity. | 
| Modifier and Type | Method and Description | 
|---|---|
| long | getLength()Returns the length of this Blob, in bytes. | 
| java.lang.Object | getLocator()Always returns null. | 
| java.io.InputStream | openInputStream()Returns an InputStream for reading Blob data positioned at the
 start. | 
| java.io.InputStream | openInputStream(long pos)Returns an InputStream for reading Blob data. | 
| java.io.InputStream | openInputStream(long pos,
               int bufferSize)Returns an InputStream for reading Blob data. | 
| java.io.OutputStream | openOutputStream()Returns an OutputStream for writing Blob data, positioned at the
 start. | 
| java.io.OutputStream | openOutputStream(long pos)Returns an OutputStream for writing Blob data. | 
| java.io.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. | 
public ByteArrayBlob(int capacity)
capacity - initial capacity of internal byte arraypublic ByteArrayBlob(byte[] data)
data - initial data backing the Blobpublic ByteArrayBlob(byte[] data,
             int length)
data - initial data backing the Bloblength - initial length of datapublic java.io.InputStream openInputStream()
Blobpublic java.io.InputStream openInputStream(long pos)
Blobpos - desired zero-based position to read frompublic java.io.InputStream openInputStream(long pos,
                                  int bufferSize)
Blobpos - desired zero-based position to read frombufferSize - suggest that the input stream buffer be at least this large (in bytes)public long getLength()
Blobpublic java.io.OutputStream openOutputStream()
Blobpublic java.io.OutputStream openOutputStream(long pos)
Blobpos - desired zero-based position to write topublic java.io.OutputStream openOutputStream(long pos,
                                    int bufferSize)
Blobpos - desired zero-based position to write tobufferSize - suggest that the output stream buffer be at least this large (in bytes)public void setLength(long length)
               throws PersistException
Bloblength - new length to set toPersistDeniedException - if Blob is read-onlyPersistExceptionpublic java.lang.Object getLocator()
Copyright © 2006-2013 Amazon Technologies, Inc.. All Rights Reserved.