|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.amazon.carbonado.lob.AbstractBlob
com.amazon.carbonado.lob.FileBlob
public class FileBlob
Implementation of a Blob which is backed by a File.
| Constructor Summary | |
|---|---|
FileBlob(File file)
|
|
| Method Summary | |
|---|---|
long |
getLength()
Returns the length of this Blob, in bytes. |
Object |
getLocator()
Always returns null. |
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. |
| Methods inherited from class com.amazon.carbonado.lob.AbstractBlob |
|---|
asString, asString, asString, equals, hashCode, setValue, setValue, setValue, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FileBlob(File file)
| Method Detail |
|---|
public InputStream openInputStream()
throws FetchException
Blob
FetchException
public InputStream openInputStream(long pos)
throws FetchException
Blob
pos - desired zero-based position to read from
FetchException
public 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 OutputStream openOutputStream()
throws PersistException
Blob
PersistException
public OutputStream openOutputStream(long pos)
throws PersistException
Blob
pos - desired zero-based position to write to
PersistException
public 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 to
PersistDeniedException - if Blob is read-only
PersistExceptionpublic Object getLocator()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||