| Modifier and Type | Field and Description |
|---|---|
| public static final FileMagic | BIFF2
BIFF2 raw stream - for Excel 2 |
| public static final FileMagic | BIFF3
BIFF3 raw stream - for Excel 3 |
| public static final FileMagic | BIFF4
BIFF4 raw stream - for Excel 4 |
| public static final FileMagic | BMP
BMP image |
| public static final FileMagic | EMF
EMF image |
| public static final FileMagic | GIF
GIF image |
| public static final FileMagic | HTML
Some different HTML documents |
| public static final FileMagic | JPEG
JPEG image |
| pack-priv final byte[][] | |
| pack-priv static final int | |
| public static final FileMagic | MSWRITE
Old MS Write raw stream |
| public static final FileMagic | OLE2
OLE2 / BIFF8+ stream used for Office 97 and higher documents |
| public static final FileMagic | OOXML
OOXML / ZIP stream - The first 4 bytes of an OOXML file, used in detection |
| public static final FileMagic | PDF
PDF document |
| public static final FileMagic | PNG
PNG Image |
| public static final FileMagic | RTF
RTF document |
| public static final FileMagic | TIFF
TIFF Image |
| public static final FileMagic | UNKNOWN
UNKNOWN magic |
| public static final FileMagic | WMF
WMF image with a placeable header |
| public static final FileMagic | |
| public static final FileMagic | XML
XML file - The first 5 bytes of a raw XML file, used in detection |
| Access | Constructor and Description |
|---|---|
| private | |
| private | |
| private | |
| private |
| Modifier and Type | Method and Description |
|---|---|
| private static boolean | |
| public static InputStream | Returns: a mark enabled streamstream to be checked for wrapping stream)Checks if an |
| public static FileMagic | |
| public static FileMagic | |
| public static FileMagic | valueOf(final File
a file to be identified inp)Get the file magic of the supplied
Even if this method returns |
| public static FileMagic | valueOf(InputStream
An InputStream which supports either mark/reset inp)Get the file magic of the supplied InputStream (which MUST support mark and reset). |
| public static FileMagic[] |
| BIFF2 | back to summary |
|---|---|
| public static final FileMagic BIFF2 BIFF2 raw stream - for Excel 2 | |
| BIFF3 | back to summary |
|---|---|
| public static final FileMagic BIFF3 BIFF3 raw stream - for Excel 3 | |
| BIFF4 | back to summary |
|---|---|
| public static final FileMagic BIFF4 BIFF4 raw stream - for Excel 4 | |
| BMP | back to summary |
|---|---|
| public static final FileMagic BMP BMP image | |
| EMF | back to summary |
|---|---|
| public static final FileMagic EMF EMF image | |
| GIF | back to summary |
|---|---|
| public static final FileMagic GIF GIF image | |
| HTML | back to summary |
|---|---|
| public static final FileMagic HTML Some different HTML documents | |
| JPEG | back to summary |
|---|---|
| public static final FileMagic JPEG JPEG image | |
| magic | back to summary |
|---|---|
| pack-priv final byte[][] magic | |
| MAX_PATTERN_LENGTH | back to summary |
|---|---|
| pack-priv static final int MAX_PATTERN_LENGTH | |
| MSWRITE | back to summary |
|---|---|
| public static final FileMagic MSWRITE Old MS Write raw stream | |
| OLE2 | back to summary |
|---|---|
| public static final FileMagic OLE2 OLE2 / BIFF8+ stream used for Office 97 and higher documents | |
| OOXML | back to summary |
|---|---|
| public static final FileMagic OOXML OOXML / ZIP stream - The first 4 bytes of an OOXML file, used in detection | |
| back to summary | |
|---|---|
| public static final FileMagic PDF PDF document | |
| PNG | back to summary |
|---|---|
| public static final FileMagic PNG PNG Image | |
| RTF | back to summary |
|---|---|
| public static final FileMagic RTF RTF document | |
| TIFF | back to summary |
|---|---|
| public static final FileMagic TIFF TIFF Image | |
| UNKNOWN | back to summary |
|---|---|
| public static final FileMagic UNKNOWN UNKNOWN magic | |
| WMF | back to summary |
|---|---|
| public static final FileMagic WMF WMF image with a placeable header | |
| WORD2 | back to summary |
|---|---|
| public static final FileMagic WORD2 | |
| XML | back to summary |
|---|---|
| public static final FileMagic XML XML file - The first 5 bytes of a raw XML file, used in detection | |
| FileMagic | back to summary |
|---|---|
| private FileMagic(long magic) | |
| FileMagic | back to summary |
|---|---|
| private FileMagic(int... magic) | |
| FileMagic | back to summary |
|---|---|
| private FileMagic(byte[]... magic) | |
| FileMagic | back to summary |
|---|---|
| private FileMagic(String... magic) | |
| findMagic | back to summary |
|---|---|
| private static boolean findMagic(byte[] expected, byte[] actual) | |
| prepareToCheckMagic | back to summary |
|---|---|
| public static InputStream prepareToCheckMagic(InputStream stream) Checks if an
| |
| valueOf | back to summary |
|---|---|
| public static FileMagic valueOf(String name) | |
| valueOf | back to summary |
|---|---|
| public static FileMagic valueOf(byte[] magic) | |
| valueOf | back to summary |
|---|---|
| public static FileMagic valueOf(final File inp) throws IOException Get the file magic of the supplied
Even if this method returns
| |
| valueOf | back to summary |
|---|---|
| public static FileMagic valueOf(InputStream inp) throws IOException Get the file magic of the supplied InputStream (which MUST support mark and reset).
If unsure if your InputStream does support mark / reset,
use
Even if this method returns
| |
| values | back to summary |
|---|---|
| public static FileMagic[] values() | |