Interface DSSDocument

All Superinterfaces:
Serializable
All Known Subinterfaces:
DSSZipEntryDocument
All Known Implementing Classes:
CMSSignedDocument, CommonDocument, ContainerEntryDocument, DigestDocument, FileArchiveEntry, FileDocument, HTTPHeader, HTTPHeaderDigest, InMemoryDocument, PdfByteRangeDocument

public interface DSSDocument extends Serializable
Interface representing a DSS document.
  • Method Summary

    Modifier and Type
    Method
    Description
    getDigest(DigestAlgorithm digestAlgorithm)
    This method returns the encoded digest value of the current DSSDocument using the base64 algorithm.
    Returns the mime-type of the DSSDocument.
    Returns the name of the document.
    Opens a InputStream on the DSSDocument contents.
    void
    save(String filePath)
    Save the content of the DSSDocument to the file.
    void
    This method sets the mime-type of the DSSDocument.
    void
    This method sets the name of the DSSDocument.
    void
    Writes the content of the document to the provided OutputStream
  • Method Details

    • openStream

      InputStream openStream()
      Opens a InputStream on the DSSDocument contents. The type of the InputStream depends on the type of the DSSDocument.
      Returns:
      an InputStream
    • writeTo

      void writeTo(OutputStream stream) throws IOException
      Writes the content of the document to the provided OutputStream
      Parameters:
      stream - the output stream where to write
      Throws:
      IOException - if any IO error happens
    • getName

      String getName()
      Returns the name of the document. If the DSSDocument was built based on the File then the file name is returned.
      Returns:
      String representing the name of the current DSSDocument
    • setName

      void setName(String name)
      This method sets the name of the DSSDocument.
      Parameters:
      name - the document name
    • getMimeType

      MimeType getMimeType()
      Returns the mime-type of the DSSDocument.
      Returns:
      MimeType
    • setMimeType

      void setMimeType(MimeType mimeType)
      This method sets the mime-type of the DSSDocument.
      Parameters:
      mimeType - MimeType
    • save

      void save(String filePath) throws IOException
      Save the content of the DSSDocument to the file.
      Parameters:
      filePath - the path to the file to be created
      Throws:
      IOException - if any IO error happens
    • getDigest

      String getDigest(DigestAlgorithm digestAlgorithm)
      This method returns the encoded digest value of the current DSSDocument using the base64 algorithm.
      Parameters:
      digestAlgorithm - DigestAlgorithm
      Returns:
      base64 encoded String