com.groupdocs.metadata

Interfaces

Classes

Exceptions

com.groupdocs.metadata

Class FormatBase

    • Field Detail

      • filePath

        protected String filePath

        Represents absolute path to the file. Could be null.

      • stream

        protected com.aspose.ms.System.IO.Stream stream

        Represents file stream.

    • Constructor Detail

      • FormatBase

        protected FormatBase(String fileName,
                  com.aspose.ms.System.Text.Encoding encoding)

        Initializes a new instance of the FormatBase class.

        Parameters:
        fileName - Absolute path to the file.
        encoding - The encoding of text metadata.
      • FormatBase

        protected FormatBase(String fileName)

        Initializes a new instance of the FormatBase class.

        Parameters:
        fileName - Absolute path to the file.
      • FormatBase

        protected FormatBase(InputStream input)

        Initializes a new instance of the FormatBase class.

        Parameters:
        input - File stream.
      • FormatBase

        protected FormatBase(InputStream inputStream,
                  com.aspose.ms.System.Text.Encoding encoding)

        Initializes a new instance of the FormatBase class.

        Parameters:
        input - File stream.
        encoding - The encoding of text metadata.
        Throws:
        com.aspose.ms.System.ArgumentNullException - File stream is not provided.
    • Method Detail

      • getType

        public abstract int getType()

        Gets document type.

        Value: Document type.
      • getMIMEType

        public final String getMIMEType()

        Gets MIME type.

        Value: The MIME type.
      • cleanMetadata

        public void cleanMetadata()

        Removes (reset) metadata. In some cases(Doc, Xls, Ppt, Pdf) metadata could not be deleted, just be reset.


        This feature is not available in trial mode.

      • getMetadata

        public final Metadata[] getMetadata()

        Gets array of Metadata contained in file.

        Returns:
        Returns array of Metadata.
      • save

        public void save(OutputStream outputStream)

        Stores file content into stream.

        Parameters:
        outputStream - Output stream.
        Throws:
        com.aspose.ms.System.ArgumentNullException - Output stream could not be null.
      • save

        public void save(String outputPath)

        Stores file content to the specific path.

        Parameters:
        outputPath - Output path.
        Throws:
        com.aspose.ms.System.ArgumentNullException - Output path could not be null.
        com.aspose.ms.System.Exception - Output path is already exists.
      • save

        public void save()

        Commits all changes.

      • dispose

        public final void dispose()

        Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

        Specified by:
        dispose in interface com.aspose.ms.System.IDisposable