public class FileBlob extends AbstractBlob
Constructor and Description |
---|
FileBlob(java.io.File file) |
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 java.io.InputStream openInputStream() throws FetchException
Blob
FetchException
public java.io.InputStream openInputStream(long pos) throws FetchException
Blob
pos
- desired zero-based position to read fromFetchException
public java.io.InputStream openInputStream(long pos, int bufferSize) throws FetchException
Blob
pos
- desired zero-based position to read frombufferSize
- suggest that the input stream buffer be at least this large (in bytes)FetchException
public long getLength() throws FetchException
Blob
FetchException
public java.io.OutputStream openOutputStream() throws PersistException
Blob
PersistException
public java.io.OutputStream openOutputStream(long pos) throws PersistException
Blob
pos
- desired zero-based position to write toPersistException
public java.io.OutputStream openOutputStream(long pos, int bufferSize) throws PersistException
Blob
pos
- desired zero-based position to write tobufferSize
- suggest that the output stream buffer be at least this large (in bytes)PersistException
public void setLength(long length) throws PersistException
Blob
length
- new length to set toPersistDeniedException
- if Blob is read-onlyPersistException
public java.lang.Object getLocator()
Copyright © 2006-2013 Amazon Technologies, Inc.. All Rights Reserved.