public class FormatFactory extends Object
Represents base operations to recognize formats.
Constructor and Description |
---|
FormatFactory() |
Modifier and Type | Method and Description |
---|---|
static FormatBase |
recognizeFormat(InputStream stream)
Recognizes file and returns appropriate instance of
FormatBase . |
static FormatBase |
recognizeFormat(String path)
Recognizes file and returns appropriate instance of
FormatBase . |
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.
path
- Absolute path to the file.FormatBase
.ArgumentNullException
- Path could not be null.com.aspose.ms.System.IO.FileNotFoundException
- Requested file not found.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.
stream
- File stream.FormatBase
.ArgumentNullException
- stream;Stream could not be null.Copyright © 2018. All rights reserved.