public class PreviewFactory extends Object
Provides a set of methods for creating instances of appropriate preview handlers.
Constructor and Description |
---|
PreviewFactory() |
Modifier and Type | Method and Description |
---|---|
static PreviewHandler |
load(InputStream stream)
Creates an appropriate preview handler from the specified stream.
|
static <T extends PreviewHandler> |
load(InputStream stream,
Class<T> handlerType)
Creates an appropriate preview handler from the specified stream.
|
static <T extends PreviewHandler> |
load(InputStream stream,
String password,
Class<T> handlerType)
Creates an appropriate preview handler from the specified stream.
|
static PreviewHandler |
load(String filePath)
Creates an appropriate preview handler from the specified file.
|
static <T extends PreviewHandler> |
load(String filePath,
Class<T> handlerType)
Creates an appropriate preview handler from the specified file.
|
static <T extends PreviewHandler> |
load(String filePath,
String password,
Class<T> handlerType)
Creates an appropriate preview handler from the specified file.
|
public static PreviewHandler load(InputStream stream)
Creates an appropriate preview handler from the specified stream.
stream
- The stream containing the document to preview.PreviewHandler
class.public static PreviewHandler load(String filePath)
Creates an appropriate preview handler from the specified file.
filePath
- The file containing the document to preview.PreviewHandler
class.public static <T extends PreviewHandler> T load(String filePath, String password, Class<T> handlerType)
Creates an appropriate preview handler from the specified file.
filePath
- The file containing the document to preview.password
- The password required to open the document.handlerType
- The exact type of the preview handler to create.
T
: The exact type of the preview handler to create.
PreviewHandler
class.public static <T extends PreviewHandler> T load(String filePath, Class<T> handlerType)
Creates an appropriate preview handler from the specified file.
filePath
- The file containing the document to preview.handlerType
- The exact type of the preview handler to create.
T
: The exact type of the preview handler to create.
PreviewHandler
class.public static <T extends PreviewHandler> T load(InputStream stream, String password, Class<T> handlerType)
Creates an appropriate preview handler from the specified stream.
stream
- The stream containing the document to preview.password
- The password required to open the document.handlerType
- The exact type of the preview handler to create.
T
: The exact type of the preview handler to create.
PreviewHandler
class.public static <T extends PreviewHandler> T load(InputStream stream, Class<T> handlerType)
Creates an appropriate preview handler from the specified stream.
stream
- The stream containing the document to preview.handlerType
- The exact type of the preview handler to create.
T
: The exact type of the preview handler to create.
PreviewHandler
class.Copyright © 2019. All rights reserved.