java.lang.Object
org.sejda.sambox.util.filetypedetector.FileTypeDetector
- Author:
- Drew Noakes code taken from https://github.com/drewnoakes/metadata-extractor Examines the a file's first bytes and estimates the file's type.
-
Method Summary
Modifier and TypeMethodDescriptionstatic FileTypedetectFileType(File file) Examines the a file's first bytes and estimates the file's type.static FileTypedetectFileType(org.sejda.io.SeekableSource source)
-
Method Details
-
detectFileType
Examines the a file's first bytes and estimates the file's type.- Parameters:
file- to examine.- Returns:
- the file type or null if it wasn't possible to determine by reading the first bytes
- Throws:
IOException- if an IO error occurs.
-
detectFileType
- Throws:
IOException
-