com.groupdocs.parser

Interfaces

Classes

Exceptions

com.groupdocs.parser

Class PreviewFactory



  • public class PreviewFactory
    extends Object

    Provides a set of methods for creating instances of appropriate preview handlers.

    • Constructor Detail

      • PreviewFactory

        public PreviewFactory()
    • Method Detail

      • load

        public static PreviewHandler load(InputStream stream)

        Creates an appropriate preview handler from the specified stream.

        Parameters:
        stream - The stream containing a document to preview.
        Returns:
        An instance of an appropriate descendant of the PreviewHandler class.
      • load

        public static PreviewHandler load(InputStream stream,
                          LoadOptions loadOptions)

        Creates an appropriate preview handler from the specified stream.

        Parameters:
        stream - The stream containing a document to preview.
        loadOptions - The options of loading the file.
        Returns:
        An instance of an appropriate descendant of the PreviewHandler class.
      • load

        public static PreviewHandler load(String filePath)

        Creates an appropriate preview handler from the specified file.

        Parameters:
        filePath - The file containing a document to preview.
        Returns:
        An instance of an appropriate descendant of the PreviewHandler class.
      • load

        public static PreviewHandler load(String filePath,
                          LoadOptions loadOptions)

        Creates an appropriate preview handler from the specified file.

        Parameters:
        filePath - The file containing a document to preview.
        loadOptions - The options of loading the file.
        Returns:
        An instance of an appropriate descendant of the PreviewHandler class.