Class MediaMetaData
java.lang.Object
de.espirit.firstspirit.access.store.mediastore.MediaMetaData
- All Implemented Interfaces:
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 Summary
ConstructorsConstructorDescriptionMediaMetaData(int height, int width, long size, String extension, Revision revision, long crc, MimeType mimeType) Construct a new media meta data instance.MediaMetaData(int height, int width, long size, String extension, Revision revision, long crc, MimeType mimeType, @Nullable String encoding) Construct a new media meta data instance. -
Method Summary
Modifier and TypeMethodDescriptionlonggetCrc()Retrieve the media's CRC value.@Nullable StringReturns the encoding if this media is a file and has a encoding.Get the media's file extension.intGet the height of the media in the given resolution.@Nullable MimeTypeReturns the immutable MIME type.Get theRevisionthe media is currently in.longgetSize()Get the media's file size.intgetWidth()Get the width of the media in the given resolution.toString()Get all relevant media metadata information as aString
-
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
Get the media's file extension.- Returns:
- file extension
- Since:
- 4.0
-
getRevision
Get theRevisionthe 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
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
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
Get all relevant media metadata information as aString
-