public interface Bucket
Modifier and Type | Method and Description |
---|---|
Bucket |
createShadow()
Create a shallow read-only copy of this bucket, using different
objects but using the same external storage.
|
void |
free()
Free the bucket, if supported.
|
java.io.InputStream |
getInputStream()
Returns an InputStream that reads data from this Bucket.
|
java.io.InputStream |
getInputStreamUnbuffered() |
java.lang.String |
getName()
Returns a name for the bucket, may be used to identify them in
certain in certain situations.
|
java.io.OutputStream |
getOutputStream()
Returns an OutputStream that is used to put data in this Bucket, from the
beginning.
|
java.io.OutputStream |
getOutputStreamUnbuffered()
Get an OutputStream which is not buffered.
|
boolean |
isReadOnly()
Is the bucket read-only?
|
void |
onResume(ClientContext context)
Called after restarting.
|
void |
setReadOnly()
Make the bucket read-only.
|
long |
size()
Returns the amount of data currently in this bucket in bytes.
|
void |
storeTo(java.io.DataOutputStream dos)
Write enough data to reconstruct the Bucket, or throw UnsupportedOperationException.
|
java.io.OutputStream getOutputStream() throws java.io.IOException
java.io.IOException
java.io.OutputStream getOutputStreamUnbuffered() throws java.io.IOException
java.io.IOException
java.io.InputStream getInputStream() throws java.io.IOException
java.io.IOException
java.io.InputStream getInputStreamUnbuffered() throws java.io.IOException
java.io.IOException
java.lang.String getName()
long size()
boolean isReadOnly()
void setReadOnly()
void free()
Bucket createShadow()
void onResume(ClientContext context) throws ResumeFailedException
context
- All the necessary runtime support will be on this object.ResumeFailedException
void storeTo(java.io.DataOutputStream dos) throws java.io.IOException
java.io.IOException