Package de.xima.fc.common.io
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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TypedByteArray(byte[] data, String contentType)Creates a new typed byte array with the specified data and content type.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringcontentType()Gets the content type of the byte array.byte[]data()Gets the byte array with the databooleanequals(Object o)inthashCode()
-
-
-
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.
-
-