Package de.xima.fc.common.data.file
Interface ISerializableFile
-
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
DefaultSerializableFile
public interface ISerializableFile extends Serializable
Represents a serializable reference to a single file. Includes metadata about the file, i.e. it file name, content type and size; and a reference to obtaining an input stream of the file's content.- Since:
- 8.2.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
contentType()
Gets the content type (mime type) of the file.ISerializableInputStreamSupplier
data()
Gets the binary data of the file.String
fileName()
Gets the name of the file.long
fileSize()
Gets the size of the file in bytes.
-
-
-
Method Detail
-
contentType
String contentType()
Gets the content type (mime type) of the file.- Returns:
- The content type of the file.
-
data
ISerializableInputStreamSupplier data()
Gets the binary data of the file. Must not be null and contain at least one byte.- Returns:
- The binary data of the file.
-
fileName
String fileName()
Gets the name of the file. Must not be blank.- Returns:
- The name of the file.
-
fileSize
long fileSize()
Gets the size of the file in bytes.- Returns:
- The size of the file in bytes.
-
-