public enum FileMagicNumber extends Enum<FileMagicNumber>
Enum Constant and Description |
---|
AAC |
AC3 |
AIFF |
AMR |
APNG |
AR |
AVI |
BMP |
BR |
BZ2 |
CAB |
CHM |
CLASS |
CRX |
DBX |
DCM |
DEB |
DEX |
DEY |
DOC |
DOCX |
DWG |
ELF |
EML |
EPUB |
EXE |
FLAC |
FLV |
GIF |
GZ |
ICO |
JPEG |
JXR |
LZ |
LZ4 |
LZOP |
M3GP |
M4A |
M4V |
MDB |
MIDI |
MKV |
MOV |
MP3 |
MP4 |
MPEG |
NES |
OGG |
OTF |
PDF |
PNG |
PPT |
PPTX |
PS |
PSD |
PST |
RAM |
RAR |
RMVB |
RPM |
RTF |
SevenZ |
SQLITE |
SWF |
TAR |
TIFF |
TORRENT |
TTF |
UNKNOWN |
WASM |
WAV |
WEBM |
WEBP |
WMV |
WOFF |
WOFF2 |
WPD |
XCF |
XLS |
XLSX |
XZ |
ZIP |
ZSTD |
Modifier and Type | Method and Description |
---|---|
String |
getExtension() |
static FileMagicNumber |
getMagicNumber(byte[] bytes)
根据给定的bytes,获取对应识别到的
FileMagicNumber |
String |
getMimeType() |
abstract boolean |
match(byte[] bytes) |
static FileMagicNumber |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static FileMagicNumber[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final FileMagicNumber UNKNOWN
public static final FileMagicNumber JPEG
public static final FileMagicNumber JXR
public static final FileMagicNumber APNG
public static final FileMagicNumber PNG
public static final FileMagicNumber GIF
public static final FileMagicNumber BMP
public static final FileMagicNumber TIFF
public static final FileMagicNumber DWG
public static final FileMagicNumber WEBP
public static final FileMagicNumber PSD
public static final FileMagicNumber ICO
public static final FileMagicNumber XCF
public static final FileMagicNumber WAV
public static final FileMagicNumber MIDI
public static final FileMagicNumber MP3
public static final FileMagicNumber OGG
public static final FileMagicNumber FLAC
public static final FileMagicNumber M4A
public static final FileMagicNumber AAC
public static final FileMagicNumber AMR
public static final FileMagicNumber AC3
public static final FileMagicNumber AIFF
public static final FileMagicNumber WOFF
public static final FileMagicNumber WOFF2
public static final FileMagicNumber TTF
public static final FileMagicNumber OTF
public static final FileMagicNumber EPUB
public static final FileMagicNumber ZIP
public static final FileMagicNumber TAR
public static final FileMagicNumber RAR
public static final FileMagicNumber GZ
public static final FileMagicNumber BZ2
public static final FileMagicNumber SevenZ
public static final FileMagicNumber PDF
public static final FileMagicNumber EXE
public static final FileMagicNumber SWF
public static final FileMagicNumber RTF
public static final FileMagicNumber NES
public static final FileMagicNumber CRX
public static final FileMagicNumber CAB
public static final FileMagicNumber PS
public static final FileMagicNumber XZ
public static final FileMagicNumber SQLITE
public static final FileMagicNumber DEB
public static final FileMagicNumber AR
public static final FileMagicNumber LZOP
public static final FileMagicNumber LZ
public static final FileMagicNumber ELF
public static final FileMagicNumber LZ4
public static final FileMagicNumber BR
public static final FileMagicNumber DCM
public static final FileMagicNumber RPM
public static final FileMagicNumber ZSTD
public static final FileMagicNumber MP4
public static final FileMagicNumber AVI
public static final FileMagicNumber WMV
public static final FileMagicNumber M4V
public static final FileMagicNumber FLV
public static final FileMagicNumber MKV
public static final FileMagicNumber WEBM
public static final FileMagicNumber MOV
public static final FileMagicNumber MPEG
public static final FileMagicNumber RMVB
public static final FileMagicNumber M3GP
public static final FileMagicNumber DOC
public static final FileMagicNumber XLS
public static final FileMagicNumber PPT
public static final FileMagicNumber DOCX
public static final FileMagicNumber PPTX
public static final FileMagicNumber XLSX
public static final FileMagicNumber WASM
public static final FileMagicNumber DEX
public static final FileMagicNumber DEY
public static final FileMagicNumber EML
public static final FileMagicNumber MDB
public static final FileMagicNumber CHM
public static final FileMagicNumber CLASS
public static final FileMagicNumber TORRENT
public static final FileMagicNumber WPD
public static final FileMagicNumber DBX
public static final FileMagicNumber PST
public static final FileMagicNumber RAM
public static FileMagicNumber[] values()
for (FileMagicNumber c : FileMagicNumber.values()) System.out.println(c);
public static FileMagicNumber valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static FileMagicNumber getMagicNumber(byte[] bytes)
FileMagicNumber
bytes
- bytes魔数FileMagicNumber
public String getMimeType()
public String getExtension()
public abstract boolean match(byte[] bytes)
Copyright © 2024. All rights reserved.