class StorageBinaryBody extends BinaryBody
Storage| Modifier and Type | Field and Description |
|---|---|
private MultiReferenceStorage |
storage |
| Constructor and Description |
|---|
StorageBinaryBody(MultiReferenceStorage storage) |
| Modifier and Type | Method and Description |
|---|---|
StorageBinaryBody |
copy()
Returns a copy of this
SingleBody (optional operation). |
void |
dispose()
Deletes the Storage that holds the content of this binary body.
|
java.io.InputStream |
getInputStream()
Gets a
InputStream which reads the bytes of the body. |
void |
writeTo(java.io.OutputStream out)
Writes this single body to the given stream.
|
getParent, setParentprivate MultiReferenceStorage storage
public StorageBinaryBody(MultiReferenceStorage storage)
public java.io.InputStream getInputStream()
throws java.io.IOException
SingleBodyInputStream which reads the bytes of the body.getInputStream in class SingleBodyjava.io.IOException - on I/O errors.public void writeTo(java.io.OutputStream out)
throws java.io.IOException
SingleBodySingleBody.getInputStream() to the specified output
stream. May be overwritten by a subclass to improve performance.writeTo in class SingleBodyout - the stream to write to.java.io.IOException - in case of an I/O errorpublic StorageBinaryBody copy()
SingleBodySingleBody (optional operation).
The general contract of this method is as follows:
SingleBody.getParent() on the copy returns null.
That means that the copy is detached from the parent entity of this
SingleBody. The copy may get attached to a different
entity later on.SingleBody.
This implementation always throws an
UnsupportedOperationException.
copy in class SingleBodySingleBody.public void dispose()
dispose in interface Disposabledispose in class SingleBodyDisposable.dispose()