public interface ExtendedBlobProvider extends BlobProvider
Blob
s, which knows how to fetch alternate content.Modifier and Type | Method and Description |
---|---|
ManagedBlob |
freezeVersion(ManagedBlob blob)
Returns a new managed blob pointing to a fixed version of the original blob.
|
Map<String,URI> |
getAvailableConversions(ManagedBlob blob,
BlobManager.UsageHint hint)
Gets a map of available MIME type conversions and corresponding
URI for a managed blob. |
InputStream |
getConvertedStream(ManagedBlob blob,
String mimeType)
Gets an
InputStream for a conversion to the given MIME type. |
InputStream |
getStream(ManagedBlob blob)
Gets an
InputStream for the data of a managed blob. |
InputStream |
getThumbnail(ManagedBlob blob)
Gets an
InputStream for a thumbnail of a managed blob. |
URI |
getURI(ManagedBlob blob,
BlobManager.UsageHint hint)
Gets an
URI for the content of a managed blob. |
boolean |
isVersion(ManagedBlob blob)
Returns true if version of the blob is a version.
|
close, initialize, readBlob, writeBlob
InputStream getStream(ManagedBlob blob) throws IOException
InputStream
for the data of a managed blob.
Like all InputStream
, the result must be closed when done with it to avoid resource leaks.
blob
- the managed blobIOException
InputStream getThumbnail(ManagedBlob blob) throws IOException
InputStream
for a thumbnail of a managed blob.
Like all InputStream
, the result must be closed when done with it to avoid resource leaks.
blob
- the managed blobIOException
URI getURI(ManagedBlob blob, BlobManager.UsageHint hint) throws IOException
URI
for the content of a managed blob.blob
- the managed blobhint
- BlobManager.UsageHint
URI
, or null
if none availableIOException
Map<String,URI> getAvailableConversions(ManagedBlob blob, BlobManager.UsageHint hint) throws IOException
URI
for a managed blob.blob
- the managed blobhint
- BlobManager.UsageHint
URI
, which may be emptyIOException
InputStream getConvertedStream(ManagedBlob blob, String mimeType) throws IOException
InputStream
for a conversion to the given MIME type.
Like all InputStream
, the result must be closed when done with it to avoid resource leaks.
blob
- the managed blobmimeType
- the MIME type to convert tonull
if no conversion is available for the given MIME typeIOException
ManagedBlob freezeVersion(ManagedBlob blob) throws IOException
blob
- the original managed blobnull
if no change is neededIOException
boolean isVersion(ManagedBlob blob)
blob
- the managed blobCopyright © 2015 Nuxeo SA. All rights reserved.