Class MediaMetaData

java.lang.Object
de.espirit.firstspirit.access.store.mediastore.MediaMetaData
All Implemented Interfaces:
Serializable

public final class MediaMetaData extends Object implements Serializable
This class holds relevant metadata information regarding Picture-objects with the resolution requested.

The MediaMetaData can be retrieved from any Picture type object by calling the getPictureMetaData(Resolution)-method. Retrieved information is always dependent on the Resolution provided.

Since:
4.0
See Also:
  • Constructor Details

    • MediaMetaData

      public MediaMetaData(int height, int width, long size, String extension, Revision revision, long crc, MimeType mimeType)
      Construct a new media meta data instance.
      Since:
      4.0.17
    • MediaMetaData

      public MediaMetaData(int height, int width, long size, String extension, Revision revision, long crc, MimeType mimeType, @Nullable @Nullable String encoding)
      Construct a new media meta data instance.
      Since:
      5.0.503
  • Method Details

    • getHeight

      public int getHeight()
      Get the height of the media in the given resolution.
      Returns:
      height of the media
      Since:
      4.0
    • getWidth

      public int getWidth()
      Get the width of the media in the given resolution.
      Returns:
      width of the media
      Since:
      4.0
    • getSize

      public long getSize()
      Get the media's file size.
      Returns:
      the size as Long
      Since:
      4.0
    • getExtension

      public String getExtension()
      Get the media's file extension.
      Returns:
      file extension
      Since:
      4.0
    • getRevision

      public Revision getRevision()
      Get the Revision the media is currently in.
      Returns:
      media revision
      Since:
      4.0
    • getCrc

      public long getCrc()
      Retrieve the media's CRC value.
      Returns:
      the CRC value
      Since:
      4.0
    • getMimeType

      @Nullable public @Nullable MimeType getMimeType()
      Returns the immutable MIME type.
      Returns:
      mime-type the guessed MimeType and may be null for pre FirstSpirit 5.0 media
      Since:
      5.0.100
    • getEncoding

      @Nullable public @Nullable String getEncoding()
      Returns the encoding if this media is a file and has a encoding. Otherwise null is returned.
      Returns:
      The media encoding or null
      Since:
      5.0.503
    • toString

      public String toString()
      Get all relevant media metadata information as a String
      Overrides:
      toString in class Object
      Returns:
      the media metadata String
      Since:
      4.0.17