Class CommonDocument

    • Constructor Detail

      • CommonDocument

        public CommonDocument()
    • Method Detail

      • save

        public void save​(String path)
                  throws IOException
        Description copied from interface: DSSDocument
        Save the content of the DSSDocument to the file.
        Specified by:
        save in interface DSSDocument
        Parameters:
        path - the path to the file to be created
        Throws:
        IOException - if any IO error happens
      • writeTo

        public void writeTo​(OutputStream stream)
                     throws IOException
        Description copied from interface: DSSDocument
        Writes the content of the document to the provided OutputStream
        Specified by:
        writeTo in interface DSSDocument
        Parameters:
        stream - the output stream where to write
        Throws:
        IOException - if any IO error happens
      • getMimeType

        public MimeType getMimeType()
        Description copied from interface: DSSDocument
        Returns the mime-type of the DSSDocument.
        Specified by:
        getMimeType in interface DSSDocument
        Returns:
        MimeType
      • setMimeType

        public void setMimeType​(MimeType mimeType)
        Description copied from interface: DSSDocument
        This method sets the mime-type of the DSSDocument.
        Specified by:
        setMimeType in interface DSSDocument
        Parameters:
        mimeType - MimeType
      • getName

        public String getName()
        Description copied from interface: DSSDocument
        Returns the name of the document. If the DSSDocument was built based on the File then the file name is returned.
        Specified by:
        getName in interface DSSDocument
        Returns:
        String representing the name of the current DSSDocument
      • setName

        public void setName​(String name)
        Description copied from interface: DSSDocument
        This method sets the name of the DSSDocument.
        Specified by:
        setName in interface DSSDocument
        Parameters:
        name - the document name
      • getAbsolutePath

        public String getAbsolutePath()
        Description copied from interface: DSSDocument
        Returns the String representing the absolute path to the encapsulated document.
        Specified by:
        getAbsolutePath in interface DSSDocument
        Returns:
        String representing the absolute path to the encapsulated document.
      • setAbsolutePath

        public void setAbsolutePath​(String absolutePath)
      • getDigest

        public String getDigest​(DigestAlgorithm digestAlgorithm)
        Description copied from interface: DSSDocument
        This method returns the encoded digest value of the current DSSDocument using the base64 algorithm.
        Specified by:
        getDigest in interface DSSDocument
        Parameters:
        digestAlgorithm - DigestAlgorithm
        Returns:
        base64 encoded String