Class FSFile
- java.lang.Object
-
- io.vertigo.datastore.impl.filestore.model.FSFile
-
- All Implemented Interfaces:
VFile,Serializable
public final class FSFile extends Object
Représentation d'un fichier créé à partir d'un FileSystem.- Author:
- npiedeloup
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description InputStreamcreateInputStream()Create a inputStream : It must be closed by caller !!PathgetFile()StringgetFileName()InstantgetLastModified()LonggetLength()StringgetMimeType()static FSFileof(String fileName, String typeMime, Path file)static FSFileof(Path file)
-
-
-
Constructor Detail
-
FSFile
public FSFile(String fileName, String mimeType, Path file) throws IOException
Constructor. Associe un fichier à des méta-données- Parameters:
fileName- Nom d'origine du fichiermimeType- Type mime du fichierfile- Fichier en lui même (non null)- Throws:
IOException- Erreur d'entrée/sortie
-
-
Method Detail
-
getFile
public Path getFile()
- Returns:
- Fichier en lui même
-
createInputStream
public InputStream createInputStream() throws IOException
Create a inputStream : It must be closed by caller !!- Returns:
- Stream représentant le document physique.
- Throws:
IOException- Erreur d'entrée/sortie
-
getFileName
public final String getFileName()
- Specified by:
getFileNamein interfaceVFile- Returns:
- Nom d'origine du fichier
-
getMimeType
public final String getMimeType()
- Specified by:
getMimeTypein interfaceVFile- Returns:
- Type mime du fichier
-
getLength
public final Long getLength()
-
getLastModified
public final Instant getLastModified()
- Specified by:
getLastModifiedin interfaceVFile- Returns:
- Date de modification du fichier en milli-secondes.
-
-