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:
  • Constructor Details

    • FileDocument

      public FileDocument(String path)
      Create a FileDocument
      Parameters:
      path - the path to the file
    • FileDocument

      public FileDocument(File file)
      Create a FileDocument
      Parameters:
      file - File
  • Method Details

    • openStream

      public InputStream openStream()
      Description copied from interface: DSSDocument
      Opens a InputStream on the DSSDocument contents. The type of the InputStream depends on the type of the DSSDocument.
      Returns:
      an InputStream
    • exists

      public boolean exists()
      Checks if the file exists
      Returns:
      TRUE if the file exists in the file system, FALSE otherwise
    • getFile

      public File getFile()
      Gets the File
      Returns:
      File
    • getAbsolutePath

      public String getAbsolutePath()
      Returns the String representing the absolute path to the encapsulated document.
      Returns:
      String representing the absolute path to the encapsulated document.