public class FormatFactory extends Object
Provides base operations to recognize files of different formats.
Constructor and Description |
---|
FormatFactory() |
Modifier and Type | Method and Description |
---|---|
static FormatBase |
recognizeFormat(InputStream stream)
Recognizes a file and returns the appropriate descendant of
FormatBase . |
static FormatBase |
recognizeFormat(String path)
Recognizes a file and returns the appropriate descendant of
FormatBase . |
public static FormatBase recognizeFormat(String path)
Recognizes a file and returns the appropriate descendant of FormatBase
.
path
- A string that contains the full name of the file from which to create a FormatBase
instance.FormatBase
.public static FormatBase recognizeFormat(InputStream stream)
Recognizes a file and returns the appropriate descendant of FormatBase
.
stream
- A stream that contains the data for this FormatBase
.FormatBase
.Copyright © 2019. All rights reserved.