Package org.ametys.cms.data
Interface File
-
- All Known Implementing Classes:
Binary,ExplorerFile
public interface File
Class representing a file
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description InputStreamgetInputStream()Returns the data stream.ZonedDateTimegetLastModificationDate()Returns the last modification date.longgetLength()Returns the length of the data stream.StringgetMimeType()Returns the data mime-type.StringgetName()Retrieves the file's nameStringgetPath()Returns the path of this resource in its hierarchy (which is a subset of the whole repository).voidsetLastModificationDate(ZonedDateTime lastModificationDate)Sets the last modification date of the file's datavoidsetMimeType(String mimeType)Sets the mime type of the file's data
-
-
-
Method Detail
-
getInputStream
InputStream getInputStream()
Returns the data stream.- Returns:
- the data stream.
-
getLastModificationDate
ZonedDateTime getLastModificationDate()
Returns the last modification date.- Returns:
- the last modification date.
-
setLastModificationDate
void setLastModificationDate(ZonedDateTime lastModificationDate)
Sets the last modification date of the file's data- Parameters:
lastModificationDate- the last modification date to set
-
getLength
long getLength()
Returns the length of the data stream.- Returns:
- the length of the data stream.
-
getMimeType
String getMimeType()
Returns the data mime-type.- Returns:
- the data mime-type.
-
setMimeType
void setMimeType(String mimeType)
Sets the mime type of the file's data- Parameters:
mimeType- the mime type to set
-
-