Class TypedByteArray

java.lang.Object
de.xima.fc.common.io.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:
  • Constructor Details

    • 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 Details

    • 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.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object