public class FileFormatUtil extends Object
Provides utility methods to detect file type.
Constructor and Description |
---|
FileFormatUtil() |
Modifier and Type | Method and Description |
---|---|
static FileFormatInfo |
detectFileFormat(InputStream stream)
Detects and returns the information about a format of a file stored in a stream.
|
static FileFormatInfo |
detectFileFormat(String filePath)
Detects and returns the information about a format of a file.
|
public static FileFormatInfo detectFileFormat(InputStream stream)
Detects and returns the information about a format of a file stored in a stream.
stream
- Source stream.FileFormatInfo
public static FileFormatInfo detectFileFormat(String filePath)
Detects and returns the information about a format of a file.
filePath
- Path to the source file.FileFormatInfo