public class FileTypeDetector extends Object
| Modifier and Type | Method and Description |
|---|---|
static FileType |
detectFileType(FilterInputStream inputStream)
Examines the file's bytes and estimates the file's type.
|
public static FileType detectFileType(FilterInputStream inputStream) throws IOException
Requires a FilterInputStream in order to mark and reset the stream to the position
at which it was provided to this method once completed.
Requires the stream to contain at least eight bytes.
IOException - if the stream does not support mark/reset.Copyright © 2002-2020 Drew Noakes. All Rights Reserved.