Class AssetImpl
java.lang.Object
org.opencastproject.assetmanager.impl.AssetImpl
- All Implemented Interfaces:
Asset
-
Constructor Summary
ConstructorsConstructorDescriptionAssetImpl(AssetId id, InputStream in, Optional<MimeType> mimeType, long size, String storeId, Availability availability, Checksum checksum) -
Method Summary
Modifier and TypeMethodDescriptionTell about the availability of the asset.Get the checksumgetId()Return the identifier of the asset.Return a stream to the asset data.Mime type of the asset.longgetSize()Size of the asset in bytes.Get the store ID of the asset store where this snapshot currently lives
-
Constructor Details
-
AssetImpl
public AssetImpl(AssetId id, InputStream in, Optional<MimeType> mimeType, long size, String storeId, Availability availability, Checksum checksum)
-
-
Method Details
-
getId
Description copied from interface:AssetReturn the identifier of the asset. -
getInputStream
Description copied from interface:AssetReturn a stream to the asset data. A client is responsible of closing the stream after consumption. Use the try with resource construct which is available from Java 7 onwards if possible.If the asset is currently not available an empty input stream is returned.
- Specified by:
getInputStreamin interfaceAsset
-
getMimeType
Description copied from interface:AssetMime type of the asset.- Specified by:
getMimeTypein interfaceAsset
-
getSize
public long getSize()Description copied from interface:AssetSize of the asset in bytes. -
getAvailability
Description copied from interface:AssetTell about the availability of the asset.- Specified by:
getAvailabilityin interfaceAsset
-
getStorageId
Description copied from interface:AssetGet the store ID of the asset store where this snapshot currently lives- Specified by:
getStorageIdin interfaceAsset
-
getChecksum
Description copied from interface:AssetGet the checksum- Specified by:
getChecksumin interfaceAsset
-