Interface DSSDocument

    • Method Summary

      Modifier and Type Method Description
      String getAbsolutePath()
      Returns the String representing the absolute path to the encapsulated document.
      String getDigest​(DigestAlgorithm digestAlgorithm)
      This method returns the encoded digest value of the current DSSDocument using the base64 algorithm.
      MimeType getMimeType()
      Returns the mime-type of the DSSDocument.
      String getName()
      Returns the name of the document.
      InputStream openStream()
      Opens a InputStream on the DSSDocument contents.
      void save​(String filePath)
      Save the content of the DSSDocument to the file.
      void setMimeType​(MimeType mimeType)
      This method sets the mime-type of the DSSDocument.
      void setName​(String name)
      This method sets the name of the DSSDocument.
      void writeTo​(OutputStream stream)
      Writes the content of the document to the provided OutputStream
    • Method Detail

      • 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
      • getAbsolutePath

        String getAbsolutePath()
        Returns the String representing the absolute path to the encapsulated document.
        Returns:
        String representing the absolute path to the encapsulated document.
      • 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