Class TypedByteArray

  • All Implemented Interfaces:
    Serializable

    public final class TypedByteArray
    extends Object
    implements Serializable
    Represents a byte array with a content type (MIME type).
    Since:
    8.3.0
    Author:
    XIMA Media GmbH
    See Also:
    Serialized Form
    • Constructor Detail

      • TypedByteArray

        public TypedByteArray​(byte[] data,
                              String contentType)
        Creates a new typed byte array with the specified data and content type.
        Parameters:
        data - The byte array with the data. Defaults to an empty byte array if null.
        contentType - The content type. Defaults to "application/octet-stream" if blank.
    • Method Detail

      • contentType

        public String contentType()
        Gets the content type of the byte array.
        Returns:
        The content type.
      • data

        public byte[] data()
        Gets the byte array with the data
        Returns:
        The byte array with the data.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object