public class SimpleManagedBlob extends AbstractBlob implements ManagedBlob
Modifier and Type | Field and Description |
---|---|
String |
key |
Long |
length |
digest, encoding, filename, mimeType, TEXT_PLAIN, UTF_8
Constructor and Description |
---|
SimpleManagedBlob(BlobManager.BlobInfo blobInfo) |
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.
|
String |
getProviderId()
Gets the id of the
BlobProvider managing this blob. |
InputStream |
getStream()
Gets an
InputStream for the data of this blob. |
equals, equalsStream, getByteArray, getCloseableFile, getCloseableFile, getDigest, getDigestAlgorithm, getEncoding, getFile, getFilename, getMimeType, getString, hashCode, setDigest, setEncoding, setFilename, setMimeType, transferTo, transferTo
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getByteArray, getCloseableFile, getCloseableFile, getDigest, getDigestAlgorithm, getEncoding, getFile, getFilename, getMimeType, getString, setDigest, setEncoding, setFilename, setMimeType, transferTo, transferTo
public SimpleManagedBlob(BlobManager.BlobInfo blobInfo)
public String getKey()
ManagedBlob
getKey
in interface ManagedBlob
public String getProviderId()
ManagedBlob
BlobProvider
managing this blob.getProviderId
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
Copyright © 2016 Nuxeo SA. All rights reserved.