A fast implementation of the interface Detector. It only reads the beginning (few Kilobytes) of a stream and try to determine the format.
It can be configured specifying a configuration file. An example can be found in the source tree: io-tools/wazformat/src/main/java/com/gc/iotools/fmt/detect/wzf/deflen.properties. The formats that it can detect are in the table below:
Enum name | Description | Supported versions |
BASE64 | Base 64 Encoded Data | |
GIF | Graphics Interchange Format Image | 87a, 89a |
M7M | Infocamere PKCS 7 digital signature document + timestamp. | |
PKCS7 | PKCS 7 Digital Signature | |
Adobe PDF (Portable Document Format) | 1.6,1.5,1.4 - Generic | |
PEM | PEM (Privacy Enhanced Mail) Signed File | |
RTF | Rich Text Format | |
XML | Extensible Markup Language | |
ZIP | Pkzip Archive |
These formats are supported by `DroidDetectorImpl`. This detector is based on droid format detection library (mantained by UK National Archives). Implementation isn't fast and requires a full read of the stream before the identification can begin.The number of supported format is great, but low performances might be an issue with large files.
Enum name | Description | Supported versions |
ADVANCED_SYSTEMS_FORMAT | Advanced Systems Format | |
AVI | Audio/Video Interleaved Format | |
DWG | AutoCAD Drawing | 1.0, 1.2, 1.3, 1.4, 2.0, 2.1, 2.2, 2.5, 2.6, R9, R10, R11/12, R13, R14, 2000-2002, 2004-2005 |
BINARY_INTERCHANGE_FILE_FORMAT_BIFF_WORKBOOK | Binary Interchange File Format (BIFF) Workbook | 4W, 5, 7, 8, 8X |
BINARY_INTERCHANGE_FILE_FORMAT_BIFF_WORKSHEET | Binary Interchange File Format (BIFF) Worksheet | 2, 3, 4S |
BROADCAST_WAVE | Broadcast WAVE | 1, 0 |
CATPART | CATIA Model (Part Description) | 5 |
CLASS | Java Compiled Object Code | |
DROID_FILE_COLLECTION_FILE_FORMAT | DROID File Collection File Format | 1.0 |
DROID_SIGNATURE_FILE_FORMAT | DROID Signature File Format | 1.0 |
DXB | Drawing Interchange Binary Format | 1.0 |
DRAWING_INTERCHANGE_FILE_FORMAT_ASCII | Drawing Interchange File Format (ASCII) | 1.0, 1.2, 1.3, 1.4, 2.0, 2.1, 2.2, 2.5, 2.6, R9, R10, R11/12, R13, R14, 2000-2002, 2004-2005, Generic |
DRAWING_INTERCHANGE_FILE_FORMAT_BINARY | Drawing Interchange File Format (Binary) | R10, R11/12, R13, R14, 2000-2002, 2004-2005 |
EPSF | Encapsulated !PostScript File Format | 1.2, 3.0, 2.0 |
EXCHANGEABLE_IMAGE_FILE_FORMAT_AUDIO | Exchangeable Image File Format (Audio) | 2.1, 2.2, 2.0 |
EXCHANGEABLE_IMAGE_FILE_FORMAT_COMPRESSED | Exchangeable Image File Format (Compressed) | 2.1, 2.2, 2.0 |
EXCHANGEABLE_IMAGE_FILE_FORMAT_UNCOMPRESSED | Exchangeable Image File Format (Uncompressed) | 2.2, 2.1, 2.0 |
XHTML | Extensible Hypertext Markup Language | 1.0, 1.1 |
XML | Extensible Markup Language | 1.0 |
FITS | Flexible Image Transport System | |
GZ | GZIP Format | |
GIF | Graphics Interchange Format | 1987a, 1989a |
HTML | Hypertext Markup Language | 2.0, 3.2, 4.0, 4.01 |
JPEG | JPEG File Interchange Format | 1.00, 1.01, 1.02 |
JAR | Java Archive Format | |
MDB | Microsoft Access Database | 2000 |
MSG | Microsoft Outlook Email Message | 97-2003 |
MPEG_1_VIDEO_FORMAT | MPEG-1 Video Format | |
MPEG_2_VIDEO_FORMAT | MPEG-2 Video Format | |
MS_DOS_EXECUTABLE | MS-DOS Executable | |
FLV | Macromedia FLV | 1 |
SWF | Macromedia Flash | 1, 2, 3, 4, 5, 6, 7 |
PPT | Microsoft Powerpoint Presentation | 4.0, 95, 97-2002 |
DOC | Microsoft Word for Windows Document | 6.0/95, 97-2003, 1.0, 2.0 |
OLE2_COMPOUND_DOCUMENT_FORMAT | OLE2 Compound Document Format | |
ODB | !OpenDocument Database Format | 1.0 |
ODG | !OpenDocument Drawing Format | 1.0 |
OPENDOCUMENT_FORMAT | OpenDocument Format | 1.0 |
ODP | !OpenDocument Presentation Format | 1.0 |
ODS | !OpenDocument Spreadsheet Format | 1.0 |
ODT | !OpenDocument Text Format | 1.0 |
SXC | !OpenOffice Calc | 1.0 |
SXD | !OpenOffice Draw | 1.0 |
SXI | !OpenOffice Impress | 1.0 |
SXW | !OpenOffice Writer | 1.0 |
PCX | PCX | 0, 2, 3, 4, 5 |
Adobe Portable Document Format (Actually broken) | 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6 | |
PNG | Portable Network Graphics | 1.0, 1.1, 1.2 |
POSTSCRIPT | !PostScript | 1.0, 2.0, 2.1, 3.0 |
QTM | Quicktime | |
RAW_JPEG_STREAM | Raw JPEG Stream | |
RAM | RealAudio Metafile | |
RTF | Rich Text Format | 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8 |
SVG | Scalable Vector Graphics | 1.0, 1.1 |
STILL_PICTURE_INTERCHANGE_FILE_FORMAT | Still Picture Interchange File Format | 1.0 |
TAGGED_IMAGE_FILE_FORMAT | Tagged Image File Format | 3, 4, 5, 6 |
WRL | Virtual Reality Modeling Language | 1.0, 97 |
WAVEFORM_AUDIO | Waveform Audio | |
BMP | Windows Bitmap | 1.0, 2.0, 3.0, 3.0 NT, 4.0, 5.0 |
WINDOWS_MEDIA_AUDIO | Windows Media Audio | |
WINDOWS_MEDIA_VIDEO | Windows Media Video | |
WINDOWS_NEW_EXECUTABLE | Windows New Executable | |
WINDOWS_PORTABLE_EXECUTABLE | Windows Portable Executable | |
WPG | !WordPerfect Graphics Metafile | 1.0 |
WORDPERFECT_FOR_MS_DOS_DOCUMENT | !WordPerfect for MS-DOS Document | 5.0 |
WORDPERFECT_FOR_MS_DOS_WINDOWS_DOCUMENT | !WordPerfect for MS-DOS/Windows Document | 5.1 |
ZIP | PKZIP Archive Format |