Class ByteArrayFile
java.lang.Object
de.xima.fc.common.file.ByteArrayFile
- All Implemented Interfaces:
Serializable
The binary data of a file, along with some metadata such as the file name.
- Since:
- 8.3.0
- Author:
- XIMA MEDIA GmbH
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionByteArrayFile(String fileName, String contentType, byte[] data) Creates a new instance with the given file name and binary data. -
Method Summary
-
Constructor Details
-
ByteArrayFile
Creates a new instance with the given file name and binary data.- Parameters:
fileName- The file name or path. Should not be null.contentType- The content type, if known, empty otherwise.data- The binary data of the file. Should not be null, but can be empty.
-
-
Method Details
-
contentType
Gets the content type of the file, if known. Returns empty string if not known.- Returns:
- The content type of the file.
-
data
public byte[] data()Gets the binary data of the file.- Returns:
- The binary data of the file.
-
fileName
-