Overview
Package
Class
Use
Tree
Deprecated
Index
Help
PREV NEXT
FRAMES
NO FRAMES
All Classes
A
B
C
D
E
F
G
I
L
M
N
P
R
S
T
U
V
A
assisgnTimeZone(SimpleDateFormat)
- Method in class com.j256.simplemagic.types.
LocalDateType
assisgnTimeZone(SimpleDateFormat)
- Method in class com.j256.simplemagic.types.
UtcDateType
assisgnTimeZone(SimpleDateFormat)
- Method in class com.j256.simplemagic.types.
UtcLongDateType
B
BigEndianConverter
- Class in
com.j256.simplemagic.endian
Converts values in "big" endian-ness where the high-order bytes come before the low-order (ABCD).
BigEndianString16Type
- Class in
com.j256.simplemagic.types
A two-byte unicode (UCS16) string in big-endian byte order.
BigEndianString16Type()
- Constructor for class com.j256.simplemagic.types.
BigEndianString16Type
bytesToChar(int, int)
- Method in class com.j256.simplemagic.types.
BigEndianString16Type
bytesToChar(int, int)
- Method in class com.j256.simplemagic.types.
LittleEndianString16Type
ByteType
- Class in
com.j256.simplemagic.types
A one-byte value.
ByteType()
- Constructor for class com.j256.simplemagic.types.
ByteType
C
com.j256.simplemagic
- package com.j256.simplemagic
Top level code used externally.
com.j256.simplemagic.endian
- package com.j256.simplemagic.endian
Endian classes which convert binary data from different machine formats.
com.j256.simplemagic.entries
- package com.j256.simplemagic.entries
Internal storing of the entries read from the magic file(s).
com.j256.simplemagic.types
- package com.j256.simplemagic.types
Various types which do the pattern matching.
ContentType
- Class in
com.j256.simplemagic
Content-type associated with a file or bytes, returned by the magic matching code in
ContentTypeUtil.findMatch(String)
and other methods.
ContentType(String, String, String)
- Constructor for class com.j256.simplemagic.
ContentType
ContentTypeUtil
- Class in
com.j256.simplemagic
Class which reads in the magic files and determines the
ContentType
for files and byte arrays.
ContentTypeUtil()
- Constructor for class com.j256.simplemagic.
ContentTypeUtil
Construct a magic utility using the internal magic file built into the package.
ContentTypeUtil(String)
- Constructor for class com.j256.simplemagic.
ContentTypeUtil
Construct a magic utility using the magic files from a file or a directory of files.
ContentTypeUtil(File)
- Constructor for class com.j256.simplemagic.
ContentTypeUtil
Construct a magic utility using the magic files from a file or a directory of files.
ContentTypeUtil.ErrorCallBack
- Interface in
com.j256.simplemagic
While we are parsing the magic configuration files, there are usually tons of badly formed lines and other errors.
convertNumber(int, byte[], int)
- Method in class com.j256.simplemagic.endian.
BigEndianConverter
convertNumber(int, byte[], int)
- Method in interface com.j256.simplemagic.endian.
EndianConverter
Convert a number of bytes starting at an offset into a long integer.
convertNumber(int, byte[], int)
- Method in class com.j256.simplemagic.endian.
LittleEndianConverter
convertNumber(int, byte[], int)
- Method in class com.j256.simplemagic.endian.
MiddleEndianConverter
convertTestString(String, String, int)
- Method in interface com.j256.simplemagic.entries.
MagicMatcher
Converts the test-string from the magic line to be an object to be passed into
#isMatch(Object, int, byte[])
.
convertTestString(String, String, int)
- Method in class com.j256.simplemagic.types.
DefaultType
convertTestString(String, String, int)
- Method in class com.j256.simplemagic.types.
DoubleType
convertTestString(String, String, int)
- Method in class com.j256.simplemagic.types.
FloatType
convertTestString(String, String, int)
- Method in class com.j256.simplemagic.types.
LongType
convertTestString(String, String, int)
- Method in class com.j256.simplemagic.types.
RegexType
convertTestString(String, String, int)
- Method in class com.j256.simplemagic.types.
StringType
D
dateFormat
- Variable in class com.j256.simplemagic.types.
LocalDateType
dateFromExtractedValue(long)
- Method in class com.j256.simplemagic.types.
LocalDateType
dateFromExtractedValue(long)
- Method in class com.j256.simplemagic.types.
LocalLongDateType
dateFromExtractedValue(long)
- Method in class com.j256.simplemagic.types.
UtcDateType
dateFromExtractedValue(long)
- Method in class com.j256.simplemagic.types.
UtcLongDateType
DefaultType
- Class in
com.j256.simplemagic.types
This is intended to be used with the test x (which is always true) and a message that is to be used if there are no other matches.
DefaultType()
- Constructor for class com.j256.simplemagic.types.
DefaultType
DoubleType
- Class in
com.j256.simplemagic.types
A 64-bit double precision IEEE floating point number in this machine's native byte order.
DoubleType(EndianType)
- Constructor for class com.j256.simplemagic.types.
DoubleType
E
EndianConverter
- Interface in
com.j256.simplemagic.endian
Class which converts from a particular machine byte representation into values appropriate for Java.
endianConverter
- Variable in class com.j256.simplemagic.types.
LongType
EndianType
- Enum in
com.j256.simplemagic.endian
Types of endian supported by the system.
error(String, String, Exception)
- Method in interface com.j256.simplemagic.
ContentTypeUtil.ErrorCallBack
An error was generated while processing the line.
extractValueFromBytes(int, byte[])
- Method in interface com.j256.simplemagic.entries.
MagicMatcher
Extract the value from the bytes.
extractValueFromBytes(int, byte[])
- Method in class com.j256.simplemagic.types.
BigEndianString16Type
extractValueFromBytes(int, byte[])
- Method in class com.j256.simplemagic.types.
ByteType
extractValueFromBytes(int, byte[])
- Method in class com.j256.simplemagic.types.
DefaultType
extractValueFromBytes(int, byte[])
- Method in class com.j256.simplemagic.types.
DoubleType
extractValueFromBytes(int, byte[])
- Method in class com.j256.simplemagic.types.
FloatType
extractValueFromBytes(int, byte[])
- Method in class com.j256.simplemagic.types.
IntegerType
extractValueFromBytes(int, byte[])
- Method in class com.j256.simplemagic.types.
LocalLongDateType
extractValueFromBytes(int, byte[])
- Method in class com.j256.simplemagic.types.
LongType
extractValueFromBytes(int, byte[])
- Method in class com.j256.simplemagic.types.
PStringType
extractValueFromBytes(int, byte[])
- Method in class com.j256.simplemagic.types.
RegexType
extractValueFromBytes(int, byte[])
- Method in class com.j256.simplemagic.types.
ShortType
extractValueFromBytes(int, byte[])
- Method in class com.j256.simplemagic.types.
StringType
F
findMatch(String)
- Method in class com.j256.simplemagic.
ContentTypeUtil
Return the content type for the file or null if none of the magic entries matched.
findMatch(File)
- Method in class com.j256.simplemagic.
ContentTypeUtil
Return the content type for the file or null if none of the magic entries matched.
findMatch(InputStream)
- Method in class com.j256.simplemagic.
ContentTypeUtil
Return the content type for the input-stream or null if none of the magic entries matched.
findMatch(byte[])
- Method in class com.j256.simplemagic.
ContentTypeUtil
Return the content type from the associated bytes or null if none of the magic entries matched.
findOffsetMatch(StringType.StringTestInfo, int, byte[], String)
- Method in class com.j256.simplemagic.types.
StringType
Called from the string and search types to see if a string or byte array matches our pattern.
FloatType
- Class in
com.j256.simplemagic.types
A 32-bit single precision IEEE floating point number in this machine's native byte order.
FloatType(EndianType)
- Constructor for class com.j256.simplemagic.types.
FloatType
format(StringBuilder, Object)
- Method in class com.j256.simplemagic.entries.
Formatter
Formats the extracted value assigned and returns the associated string
Formatter
- Class in
com.j256.simplemagic.entries
Formatter that handles the C %0.2f type formats appropriately.
Formatter(String)
- Constructor for class com.j256.simplemagic.entries.
Formatter
This takes a format string, breaks it up into prefix, %-thang, and suffix.
G
getConverter()
- Method in enum com.j256.simplemagic.endian.
EndianType
Returns the converter associated with this endian-type.
getLevel()
- Method in class com.j256.simplemagic.entries.
MagicEntry
Return the "level" of the rule.
getMessage()
- Method in class com.j256.simplemagic.
ContentType
Returns the full message as generated by the magic matching code.
getMimeType()
- Method in class com.j256.simplemagic.
ContentType
Returns the mime-type or null if none.
getName()
- Method in class com.j256.simplemagic.
ContentType
Returns the short name of the content type.
getStrength()
- Method in class com.j256.simplemagic.entries.
MagicEntry
Get the strength of the rule.
I
IntegerType
- Class in
com.j256.simplemagic.types
A four-byte integer value.
IntegerType(EndianType)
- Constructor for class com.j256.simplemagic.types.
IntegerType
isMatch(Object, Long, boolean, Object, int, byte[])
- Method in interface com.j256.simplemagic.entries.
MagicMatcher
Matches if the bytes match at a certain offset.
isMatch(Long, boolean, long, int, byte[])
- Method in class com.j256.simplemagic.entries.
NumberOperator
isMatch(Object, Long, boolean, Object, int, byte[])
- Method in class com.j256.simplemagic.types.
DefaultType
isMatch(Object, Long, boolean, Object, int, byte[])
- Method in class com.j256.simplemagic.types.
DoubleType
isMatch(Object, Long, boolean, Object, int, byte[])
- Method in class com.j256.simplemagic.types.
FloatType
isMatch(Object, Long, boolean, Object, int, byte[])
- Method in class com.j256.simplemagic.types.
LongType
isMatch(Object, Long, boolean, Object, int, byte[])
- Method in class com.j256.simplemagic.types.
RegexType
isMatch(Object, Long, boolean, Object, int, byte[])
- Method in class com.j256.simplemagic.types.
SearchType
isMatch(Object, Long, boolean, Object, int, byte[])
- Method in class com.j256.simplemagic.types.
StringType
L
LittleEndianConverter
- Class in
com.j256.simplemagic.endian
Converts values in "little" endian-ness where the high-order bytes come _after_ the low-order (DCBA).
LittleEndianString16Type
- Class in
com.j256.simplemagic.types
A two-byte unicode (UCS16) string in little-endian byte order.
LittleEndianString16Type()
- Constructor for class com.j256.simplemagic.types.
LittleEndianString16Type
LocalDateType
- Class in
com.j256.simplemagic.types
A 4-byte value interpreted as a UNIX-style date, but interpreted as local time rather than UTC.
LocalDateType(EndianType)
- Constructor for class com.j256.simplemagic.types.
LocalDateType
LocalLongDateType
- Class in
com.j256.simplemagic.types
An 8-byte value interpreted as a UNIX-style date, but interpreted as local time rather than UTC.
LocalLongDateType(EndianType)
- Constructor for class com.j256.simplemagic.types.
LocalLongDateType
LongType
- Class in
com.j256.simplemagic.types
An eight-byte value.
LongType(EndianType)
- Constructor for class com.j256.simplemagic.types.
LongType
M
MagicEntry
- Class in
com.j256.simplemagic.entries
Representation of a line of information from the magic (5) format.
MagicMatcher
- Interface in
com.j256.simplemagic.entries
Classes which are able to match content according to operations and output description.
MagicType
- Enum in
com.j256.simplemagic.entries
The various types which correspond to the "type" part of the magic (5) format.
matcherfromString(String)
- Static method in enum com.j256.simplemagic.entries.
MagicType
Find the associated matcher to the string.
MiddleEndianConverter
- Class in
com.j256.simplemagic.endian
A four-byte value in middle-endian (god help us) PDP-11 byte order.
N
NumberOperator
- Class in
com.j256.simplemagic.entries
Internal class that provides information about a particular test.
NumberOperator(String)
- Constructor for class com.j256.simplemagic.entries.
NumberOperator
Preprocess the test string into an operator and a value class.
NumberOperator(NumberOperator.TestOperator, long)
- Constructor for class com.j256.simplemagic.entries.
NumberOperator
P
parseLine(MagicEntry, String, ContentTypeUtil.ErrorCallBack)
- Static method in class com.j256.simplemagic.entries.
MagicEntry
Parse a line from the magic configuration file into an entry.
processBytes(byte[])
- Method in class com.j256.simplemagic.entries.
MagicEntry
Returns the content type associated with the bytes or null if it does not match.
PStringType
- Class in
com.j256.simplemagic.types
A Pascal-style string where the first byte is interpreted as the an unsigned length.
PStringType()
- Constructor for class com.j256.simplemagic.types.
PStringType
R
RegexType
- Class in
com.j256.simplemagic.types
From the magic(5) man page: A regular expression match in extended POSIX regular expression syntax (like egrep).
RegexType()
- Constructor for class com.j256.simplemagic.types.
RegexType
renderValue(StringBuilder, Object, Formatter)
- Method in interface com.j256.simplemagic.entries.
MagicMatcher
Returns the string version of the extracted value.
renderValue(StringBuilder, Object, Formatter)
- Method in class com.j256.simplemagic.types.
DefaultType
renderValue(StringBuilder, Object, Formatter)
- Method in class com.j256.simplemagic.types.
DoubleType
renderValue(StringBuilder, Object, Formatter)
- Method in class com.j256.simplemagic.types.
FloatType
renderValue(StringBuilder, Object, Formatter)
- Method in class com.j256.simplemagic.types.
LocalDateType
renderValue(StringBuilder, Object, Formatter)
- Method in class com.j256.simplemagic.types.
LongType
renderValue(StringBuilder, Object, Formatter)
- Method in class com.j256.simplemagic.types.
RegexType
renderValue(StringBuilder, Object, Formatter)
- Method in class com.j256.simplemagic.types.
StringType
S
SearchType
- Class in
com.j256.simplemagic.types
From the magic(5) man page: A literal string search starting at the given line offset.
SearchType()
- Constructor for class com.j256.simplemagic.types.
SearchType
setErrorCallBack(ContentTypeUtil.ErrorCallBack)
- Method in class com.j256.simplemagic.
ContentTypeUtil
Set our class which will get called whenever we get a configuration error.
setFileReadSize(int)
- Method in class com.j256.simplemagic.
ContentTypeUtil
Set the default size that will be read if we are getting the content from a file.
ShortType
- Class in
com.j256.simplemagic.types
A two-byte value.
ShortType(EndianType)
- Constructor for class com.j256.simplemagic.types.
ShortType
StringType
- Class in
com.j256.simplemagic.types
From the magic(5) man page: A string of bytes.
StringType()
- Constructor for class com.j256.simplemagic.types.
StringType
StringType.StringTestInfo
- Class in
com.j256.simplemagic.types
Internal holder for test information about strings.
StringType.StringTestInfo(String, boolean, boolean, boolean, int)
- Constructor for class com.j256.simplemagic.types.
StringType.StringTestInfo
T
toString()
- Method in class com.j256.simplemagic.
ContentType
toString()
- Method in class com.j256.simplemagic.entries.
Formatter
toString()
- Method in class com.j256.simplemagic.entries.
MagicEntry
toString()
- Method in class com.j256.simplemagic.types.
StringType.StringTestInfo
U
UtcDateType
- Class in
com.j256.simplemagic.types
A 4-byte value interpreted as a UNIX date in UTC timezone.
UtcDateType(EndianType)
- Constructor for class com.j256.simplemagic.types.
UtcDateType
UtcLongDateType
- Class in
com.j256.simplemagic.types
A 8-byte value interpreted as a UNIX date in UTC timezone.
UtcLongDateType(EndianType)
- Constructor for class com.j256.simplemagic.types.
UtcLongDateType
V
valueOf(String)
- Static method in enum com.j256.simplemagic.endian.
EndianType
Returns the enum constant of this type with the specified name.
valueOf(String)
- Static method in enum com.j256.simplemagic.entries.
MagicType
Returns the enum constant of this type with the specified name.
values()
- Static method in enum com.j256.simplemagic.endian.
EndianType
Returns an array containing the constants of this enum type, in the order they are declared.
values()
- Static method in enum com.j256.simplemagic.entries.
MagicType
Returns an array containing the constants of this enum type, in the order they are declared.
A
B
C
D
E
F
G
I
L
M
N
P
R
S
T
U
V
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
PREV NEXT
FRAMES
NO FRAMES
All Classes
This content is licensed by Gray Watson under the
Creative Commons Attribution-Share Alike 3.0 License.