com.groupdocs.metadata

Interfaces

Classes

Exceptions

com.groupdocs.metadata

Class FormatFactory



  • public class FormatFactory
    extends Object

    Represents base operations to recognize formats.

    • Constructor Detail

      • FormatFactory

        public FormatFactory()
    • Method Detail

      • recognizeFormat

        public static FormatBase recognizeFormat(String path)

        Recognizes file and returns appropriate instance of FormatBase. Please note that file is recognized by signature, not by extension.

        Parameters:
        path - Absolute path to the file.
        Returns:
        Appropriate FormatBase.
        Throws:
        ArgumentNullException - Path could not be null.
        com.aspose.ms.System.IO.FileNotFoundException - Requested file not found.
      • recognizeFormat

        public static FormatBase recognizeFormat(InputStream stream)

        Recognizes file and returns appropriate instance of FormatBase. Please note that file is recognized by signature, not by extension.

        Parameters:
        stream - File stream.
        Returns:
        Appropriate FormatBase.
        Throws:
        ArgumentNullException - stream;Stream could not be null.