public interface Rendition extends Resource
Rendition
is a read only representation of a particular rendition of an Asset
.
Rendition is an extension of a Sling Resource, therefore its adaptable.
Rendition is created by Asset.setRendition(String, java.io.InputStream, java.util.Map)
and can be
retrieved either via Asset.getRendition(String)
or by adapting a rendition Resource
to a Rendition
type.
eg: // to create a rendition AssetManager assetManager = resolver.adaptTo(AssetManager.class); Asset asset = assetManager.getAsset("/path/to/asset/document.pdf"); asset.setRendition("thumbnail.jpg", java.io.InputStream, java.util.Map); // to get rendition Rendition rendition = asset.getRendition("thumbnail.jpg"); // to get rendition by adapting Rendition rendition = resource.adaptTo(Rendition.class);
RESOURCE_TYPE_NON_EXISTING
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getMimeType()
Returns the mime type of the rendition's binary.
|
long |
getSize()
Returns the size in bytes of the rendition's binary.
|
java.io.InputStream |
getStream()
Returns the
InputStream representing the binary of this rendition. |
getChild, getChildren, getName, getParent, getPath, getResourceMetadata, getResourceResolver, getResourceSuperType, getResourceType, getValueMap, hasChildren, isResourceType, listChildren
java.lang.String getMimeType()
long getSize()
java.io.InputStream getStream()
InputStream
representing the binary of this rendition.null
if the binary is not found.AssetIOException
- if stream cannot be read"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"