public class SimpleManagedBlob extends AbstractBlob implements ManagedBlob
Modifier and Type | Field and Description |
---|---|
ManagedBlobProvider |
blobProvider |
String |
key |
TEXT_PLAIN, UTF_8
Constructor and Description |
---|
SimpleManagedBlob(BlobManager.BlobInfo blobInfo,
ManagedBlobProvider blobProvider) |
Modifier and Type | Method and Description |
---|---|
String |
getKey()
Gets the stored representation of this blob.
|
long |
getLength()
Gets the data length in bytes if known.
|
InputStream |
getStream()
Gets an
InputStream for the data of this blob. |
equals, getByteArray, getCloseableFile, getCloseableFile, getDigest, getEncoding, getFile, getFilename, getMimeType, getString, hashCode, setDigest, setEncoding, setFilename, setMimeType, transferTo, transferTo
getClass, notify, notifyAll, toString, wait, wait, wait
getByteArray, getCloseableFile, getCloseableFile, getDigest, getEncoding, getFile, getFilename, getMimeType, getString, setDigest, setEncoding, setFilename, setMimeType, transferTo, transferTo
public final String key
public transient ManagedBlobProvider blobProvider
public SimpleManagedBlob(BlobManager.BlobInfo blobInfo, ManagedBlobProvider blobProvider)
public String getKey()
ManagedBlob
getKey
in interface ManagedBlob
public InputStream getStream() throws IOException
Blob
InputStream
for the data of this blob.
The contract of Blob
is that this method can be called several times and will correctly return a new
InputStream
each time. In other words, several reads of the Blob
can be done.
Like all InputStream
, the result must be closed when done with it to avoid resource leaks.
getStream
in interface Blob
IOException
public long getLength()
Blob
getLength
in interface Blob
getLength
in class AbstractBlob
Copyright © 2015 Nuxeo SA. All rights reserved.