Class AssetImpl

java.lang.Object
org.opencastproject.assetmanager.impl.AssetImpl
All Implemented Interfaces:
Asset

public class AssetImpl extends Object implements Asset
  • Constructor Details

  • Method Details

    • getId

      public AssetId getId()
      Description copied from interface: Asset
      Return the identifier of the asset.
      Specified by:
      getId in interface Asset
    • getInputStream

      public InputStream getInputStream()
      Description copied from interface: Asset
      Return 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:
      getInputStream in interface Asset
    • getMimeType

      public Optional<MimeType> getMimeType()
      Description copied from interface: Asset
      Mime type of the asset.
      Specified by:
      getMimeType in interface Asset
    • getSize

      public long getSize()
      Description copied from interface: Asset
      Size of the asset in bytes.
      Specified by:
      getSize in interface Asset
    • getAvailability

      public Availability getAvailability()
      Description copied from interface: Asset
      Tell about the availability of the asset.
      Specified by:
      getAvailability in interface Asset
    • getStorageId

      public String getStorageId()
      Description copied from interface: Asset
      Get the store ID of the asset store where this snapshot currently lives
      Specified by:
      getStorageId in interface Asset
    • getChecksum

      public Checksum getChecksum()
      Description copied from interface: Asset
      Get the checksum
      Specified by:
      getChecksum in interface Asset