Package eu.europa.esig.dss.model
Class FileDocument
java.lang.Object
eu.europa.esig.dss.model.CommonDocument
eu.europa.esig.dss.model.FileDocument
- All Implemented Interfaces:
DSSDocument
,Serializable
public class FileDocument extends CommonDocument
Document implementation stored on file-system.
- See Also:
- Serialized Form
-
Field Summary
Fields inherited from class eu.europa.esig.dss.model.CommonDocument
absolutePath, base64EncodeDigestMap, mimeType, name
-
Constructor Summary
Constructors Constructor Description FileDocument(File file)
Create a FileDocumentFileDocument(String path)
Create a FileDocument -
Method Summary
Modifier and Type Method Description boolean
exists()
String
getAbsolutePath()
Returns theString
representing the absolute path to the encapsulated document.File
getFile()
InputStream
openStream()
Opens aInputStream
on theDSSDocument
contents.Methods inherited from class eu.europa.esig.dss.model.CommonDocument
getDigest, getMimeType, getName, save, setAbsolutePath, setMimeType, setName, toString, writeTo
-
Constructor Details
-
FileDocument
Create a FileDocument- Parameters:
path
- the path to the file
-
FileDocument
Create a FileDocument- Parameters:
file
-File
-
-
Method Details
-
openStream
Description copied from interface:DSSDocument
Opens aInputStream
on theDSSDocument
contents. The type of theInputStream
depends on the type of theDSSDocument
.- Returns:
- an
InputStream
-
exists
public boolean exists() -
getFile
-
getAbsolutePath
Description copied from interface:DSSDocument
Returns theString
representing the absolute path to the encapsulated document.- Specified by:
getAbsolutePath
in interfaceDSSDocument
- Overrides:
getAbsolutePath
in classCommonDocument
- Returns:
String
representing the absolute path to the encapsulated document.
-