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 InputStream
createInputStream()
Create a inputStream : It must be closed by caller !!Path
getFile()
String
getFileName()
Instant
getLastModified()
Long
getLength()
String
getMimeType()
static FSFile
of(String fileName, String typeMime, Path file)
static FSFile
of(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:
getFileName
in interfaceVFile
- Returns:
- Nom d'origine du fichier
-
getMimeType
public final String getMimeType()
- Specified by:
getMimeType
in interfaceVFile
- Returns:
- Type mime du fichier
-
getLength
public final Long getLength()
-
getLastModified
public final Instant getLastModified()
- Specified by:
getLastModified
in interfaceVFile
- Returns:
- Date de modification du fichier en milli-secondes.
-
-