Skip navigation links
A B C D E F G I J L M N O P R S T U V W 

A

append(Object, StringBuilder) - Method in class com.j256.simplemagic.entries.PercentExpression
 
assisgnTimeZone(SimpleDateFormat) - Method in class com.j256.simplemagic.types.LocalDateType
 
assisgnTimeZone(SimpleDateFormat) - Method in class com.j256.simplemagic.types.UtcDateType
 
available() - Method in class com.j256.simplemagic.ContentInfoInputStreamWrapper
 

B

BaseLongType - Class in com.j256.simplemagic.types
Base class for those types which use long types to compare.
BaseLongType(EndianType) - Constructor for class com.j256.simplemagic.types.BaseLongType
 
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
Convert 2 bytes into a character.
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

close() - Method in class com.j256.simplemagic.ContentInfoInputStreamWrapper
 
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.logger - package com.j256.simplemagic.logger
 
com.j256.simplemagic.types - package com.j256.simplemagic.types
Various types which do the pattern matching.
CommonsLoggingLog - Class in com.j256.simplemagic.logger
Class which implements our Log interface by delegating to the Apache commons logging classes.
CommonsLoggingLog(String) - Constructor for class com.j256.simplemagic.logger.CommonsLoggingLog
 
compare(boolean, Number, Number) - Method in class com.j256.simplemagic.types.ByteType
 
compare(boolean, Number, Number) - Method in class com.j256.simplemagic.types.DoubleType
 
compare(boolean, Number, Number) - Method in class com.j256.simplemagic.types.FloatType
 
compare(boolean, Number, Number) - Method in class com.j256.simplemagic.types.IntegerType
 
compare(boolean, Number, Number) - Method in class com.j256.simplemagic.types.LongType
 
compare(boolean, Number, Number) - Method in class com.j256.simplemagic.types.NumberType
Return -1 if extractedValue is < testValue, 1 if it is >, 0 if it is equals.
compare(boolean, Number, Number) - Method in class com.j256.simplemagic.types.ShortType
 
ContentInfo - Class in com.j256.simplemagic
Information associated with some content, returned by the magic matching code in ContentInfoUtil.findMatch(String) and other methods.
ContentInfo(String, String, String, boolean) - Constructor for class com.j256.simplemagic.ContentInfo
 
ContentInfo(ContentType) - Constructor for class com.j256.simplemagic.ContentInfo
 
ContentInfoInputStreamWrapper - Class in com.j256.simplemagic
Class which wraps and delegates to another InputStream.
ContentInfoInputStreamWrapper(InputStream, ContentInfoUtil) - Constructor for class com.j256.simplemagic.ContentInfoInputStreamWrapper
Create a stream wrapper while specifying your own ContentInfoUtil.
ContentInfoInputStreamWrapper(InputStream) - Constructor for class com.j256.simplemagic.ContentInfoInputStreamWrapper
Create a stream wrapper while using the internal, static ContentInfoUtil.
ContentInfoUtil - Class in com.j256.simplemagic
Class which reads in the magic files and determines the ContentInfo for files and byte arrays.
ContentInfoUtil() - Constructor for class com.j256.simplemagic.ContentInfoUtil
Construct a magic utility using the internal magic file built into the package.
ContentInfoUtil(ContentInfoUtil.ErrorCallBack) - Constructor for class com.j256.simplemagic.ContentInfoUtil
Construct a magic utility using the internal magic file built into the package.
ContentInfoUtil(String) - Constructor for class com.j256.simplemagic.ContentInfoUtil
Construct a magic utility using the magic files from a file or a directory of files.
ContentInfoUtil(String, ContentInfoUtil.ErrorCallBack) - Constructor for class com.j256.simplemagic.ContentInfoUtil
Construct a magic utility using the magic files from a file or a directory of files.
ContentInfoUtil(File) - Constructor for class com.j256.simplemagic.ContentInfoUtil
Construct a magic utility using the magic files from a file or a directory of files.
ContentInfoUtil(File, ContentInfoUtil.ErrorCallBack) - Constructor for class com.j256.simplemagic.ContentInfoUtil
Construct a magic utility using the magic files from a file or a directory of files.
ContentInfoUtil(Reader) - Constructor for class com.j256.simplemagic.ContentInfoUtil
Construct a magic utility using the magic file entries from a reader.
ContentInfoUtil(Reader, ContentInfoUtil.ErrorCallBack) - Constructor for class com.j256.simplemagic.ContentInfoUtil
Construct a magic utility using the magic file entries from a reader.
ContentInfoUtil.ErrorCallBack - Interface in com.j256.simplemagic
Optional call-back which will be made whenever we discover an error while parsing the magic configuration files.
ContentType - Enum in com.j256.simplemagic
Enumerated type of the content if it is known by SimpleMagic matched from the mime-type.
convertId3(int, byte[], int) - Method in class com.j256.simplemagic.endian.BigEndianConverter
 
convertId3(int, byte[], int) - Method in interface com.j256.simplemagic.endian.EndianConverter
Convert a number of bytes starting at an offset into a long integer where the high-bit in each byte is always 0.
convertId3(int, byte[], int) - Method in class com.j256.simplemagic.endian.LittleEndianConverter
 
convertId3(int, byte[], int) - Method in class com.j256.simplemagic.endian.MiddleEndianConverter
 
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) - Method in interface com.j256.simplemagic.entries.MagicMatcher
Converts the test-string from the magic line to be the testValue object to be passed into MagicMatcher.isMatch(Object, Long, boolean, Object, MutableOffset, byte[]) and MagicMatcher.getStartingBytes(Object).
convertTestString(String, String) - Method in class com.j256.simplemagic.types.DefaultType
 
convertTestString(String, String) - Method in class com.j256.simplemagic.types.NumberType
 
convertTestString(String, String) - Method in class com.j256.simplemagic.types.RegexType
 
convertTestString(String, String) - Method in class com.j256.simplemagic.types.StringType
 
convertToByteArray(long, int) - Method in class com.j256.simplemagic.endian.BigEndianConverter
 
convertToByteArray(long, int) - Method in interface com.j256.simplemagic.endian.EndianConverter
Translate a number into an array of bytes.
convertToByteArray(long, int) - Method in class com.j256.simplemagic.endian.LittleEndianConverter
 
convertToByteArray(long, int) - Method in class com.j256.simplemagic.endian.MiddleEndianConverter
 

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
 
debug(String) - Method in class com.j256.simplemagic.logger.Logger
Log a debug message.
debug(String, Object) - Method in class com.j256.simplemagic.logger.Logger
Log a debug message.
debug(String, Object, Object) - Method in class com.j256.simplemagic.logger.Logger
Log a debug message.
debug(String, Object, Object, Object) - Method in class com.j256.simplemagic.logger.Logger
Log a debug message.
debug(String, Object[]) - Method in class com.j256.simplemagic.logger.Logger
Log a debug message.
debug(Throwable, String) - Method in class com.j256.simplemagic.logger.Logger
Log a debug message with a throwable.
debug(Throwable, String, Object) - Method in class com.j256.simplemagic.logger.Logger
Log a debug message with a throwable.
debug(Throwable, String, Object, Object) - Method in class com.j256.simplemagic.logger.Logger
Log a debug message with a throwable.
debug(Throwable, String, Object, Object, Object) - Method in class com.j256.simplemagic.logger.Logger
Log a debug message with a throwable.
debug(Throwable, String, Object[]) - Method in class com.j256.simplemagic.logger.Logger
Log a debug message with a throwable.
decodeValueString(String) - Method in class com.j256.simplemagic.types.BaseLongType
 
decodeValueString(String) - Method in class com.j256.simplemagic.types.DoubleType
 
decodeValueString(String) - Method in class com.j256.simplemagic.types.FloatType
 
decodeValueString(String) - Method in class com.j256.simplemagic.types.NumberType
Decode the test string value.
DEFAULT_OPERATOR - Static variable in enum com.j256.simplemagic.types.StringOperator
Default operator which should be used if StringOperator.fromTest(String) returns null;
DEFAULT_OPERATOR - Static variable in enum com.j256.simplemagic.types.TestOperator
Default operator which should be used if TestOperator.fromTest(String) returns null;
DEFAULT_READ_SIZE - Static variable in class com.j256.simplemagic.ContentInfoUtil
Number of bytes that the utility class by default reads to determine the content type information.
DefaultType - Class in com.j256.simplemagic.types
This is intended to be used with the test @code{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
 
doTest(char, char, boolean) - Method in enum com.j256.simplemagic.types.StringOperator
Test 2 characters.
doTest(boolean, Number, Number, NumberType) - Method in enum com.j256.simplemagic.types.TestOperator
Perform the test using the operator.
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

EMPTY - Static variable in class com.j256.simplemagic.types.StringType
 
EMPTY_INFO - Static variable in class com.j256.simplemagic.ContentInfo
 
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.NumberType
 
EndianType - Enum in com.j256.simplemagic.endian
Types of endian supported by the system.
error(String, String, Exception) - Method in interface com.j256.simplemagic.ContentInfoUtil.ErrorCallBack
An error was generated while processing the line.
error(String) - Method in class com.j256.simplemagic.logger.Logger
Log a error message.
error(String, Object) - Method in class com.j256.simplemagic.logger.Logger
Log a error message.
error(String, Object, Object) - Method in class com.j256.simplemagic.logger.Logger
Log a error message.
error(String, Object, Object, Object) - Method in class com.j256.simplemagic.logger.Logger
Log a error message.
error(String, Object[]) - Method in class com.j256.simplemagic.logger.Logger
Log a error message.
error(Throwable, String) - Method in class com.j256.simplemagic.logger.Logger
Log a error message with a throwable.
error(Throwable, String, Object) - Method in class com.j256.simplemagic.logger.Logger
Log a error message with a throwable.
error(Throwable, String, Object, Object) - Method in class com.j256.simplemagic.logger.Logger
Log a error message with a throwable.
error(Throwable, String, Object, Object, Object) - Method in class com.j256.simplemagic.logger.Logger
Log a error message with a throwable.
error(Throwable, String, Object[]) - Method in class com.j256.simplemagic.logger.Logger
Log a error message with a throwable.
extractValueFromBytes(int, byte[], boolean) - Method in interface com.j256.simplemagic.entries.MagicMatcher
Extract the value from the bytes either for doing the match or rendering it in the format.
extractValueFromBytes(int, byte[], boolean) - Method in class com.j256.simplemagic.types.BigEndianString16Type
 
extractValueFromBytes(int, byte[], boolean) - Method in class com.j256.simplemagic.types.DefaultType
 
extractValueFromBytes(int, byte[], boolean) - Method in class com.j256.simplemagic.types.DoubleType
 
extractValueFromBytes(int, byte[], boolean) - Method in class com.j256.simplemagic.types.Id3LengthType
 
extractValueFromBytes(int, byte[], boolean) - Method in class com.j256.simplemagic.types.NumberType
 
extractValueFromBytes(int, byte[], boolean) - Method in class com.j256.simplemagic.types.PStringType
Extracted value is the extracted string using the first byte as the length.
extractValueFromBytes(int, byte[], boolean) - Method in class com.j256.simplemagic.types.RegexType
 
extractValueFromBytes(int, byte[], boolean) - Method in class com.j256.simplemagic.types.StringType
 

F

fatal(String) - Method in class com.j256.simplemagic.logger.Logger
Log a fatal message.
fatal(String, Object) - Method in class com.j256.simplemagic.logger.Logger
Log a fatal message.
fatal(String, Object, Object) - Method in class com.j256.simplemagic.logger.Logger
Log a fatal message.
fatal(String, Object, Object, Object) - Method in class com.j256.simplemagic.logger.Logger
Log a fatal message.
fatal(String, Object[]) - Method in class com.j256.simplemagic.logger.Logger
Log a fatal message.
fatal(Throwable, String) - Method in class com.j256.simplemagic.logger.Logger
Log a fatal message with a throwable.
fatal(Throwable, String, Object) - Method in class com.j256.simplemagic.logger.Logger
Log a fatal message with a throwable.
fatal(Throwable, String, Object, Object) - Method in class com.j256.simplemagic.logger.Logger
Log a fatal message with a throwable.
fatal(Throwable, String, Object, Object, Object) - Method in class com.j256.simplemagic.logger.Logger
Log a fatal message with a throwable.
fatal(Throwable, String, Object[]) - Method in class com.j256.simplemagic.logger.Logger
Log a fatal message with a throwable.
FINAL_PATTERN_CHARS - Static variable in class com.j256.simplemagic.entries.MagicFormatter
 
findExtensionMatch(String) - Static method in class com.j256.simplemagic.ContentInfoUtil
Return the content type if the extension from the file-name matches our internal list.
findMatch() - Method in class com.j256.simplemagic.ContentInfoInputStreamWrapper
Find a match from the bytes that have been read from the stream using ContentInfoUtil.findMatch(byte[]).
findMatch(String) - Method in class com.j256.simplemagic.ContentInfoUtil
Return the content type for the file-path or null if none of the magic entries matched.
findMatch(File) - Method in class com.j256.simplemagic.ContentInfoUtil
Return the content type for the file or null if none of the magic entries matched.
findMatch(InputStream) - Method in class com.j256.simplemagic.ContentInfoUtil
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.ContentInfoUtil
Return the content type from the associated bytes or null if none of the magic entries matched.
findMatch(byte[]) - Method in class com.j256.simplemagic.entries.MagicEntries
Find and return a match for the associated bytes.
findMimeTypeMatch(String) - Static method in class com.j256.simplemagic.ContentInfoUtil
Return the content type if the mime-type matches our internal list.
findOffsetMatch(StringType.TestInfo, int, MagicMatcher.MutableOffset, byte[], char[], int) - Method in class com.j256.simplemagic.types.StringType
Find offset match either in an array of bytes or chars, which ever is not null.
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.MagicFormatter
Formats the extracted value assigned and returns the associated string
fromFileExtension(String) - Static method in enum com.j256.simplemagic.ContentType
Return the type associated with the file-extension string or ContentType.OTHER if not found.
fromMimeType(String) - Static method in enum com.j256.simplemagic.ContentType
Return the type associated with the mime-type string or ContentType.OTHER if not found.
fromTest(String) - Static method in enum com.j256.simplemagic.types.StringOperator
Returns the operator if the first character is an operator.
fromTest(String) - Static method in enum com.j256.simplemagic.types.TestOperator
Returns the operator if the first character is an operator.

G

getBytesPerType() - Method in class com.j256.simplemagic.types.ByteType
 
getBytesPerType() - Method in class com.j256.simplemagic.types.DoubleType
Return the number of bytes in this type.
getBytesPerType() - Method in class com.j256.simplemagic.types.FloatType
 
getBytesPerType() - Method in class com.j256.simplemagic.types.IntegerType
 
getBytesPerType() - Method in class com.j256.simplemagic.types.LocalLongDateType
 
getBytesPerType() - Method in class com.j256.simplemagic.types.LongType
Return the number of bytes in this type.
getBytesPerType() - Method in class com.j256.simplemagic.types.NumberType
Return the number of bytes in this type.
getBytesPerType() - Method in class com.j256.simplemagic.types.ShortType
 
getBytesPerType() - Method in class com.j256.simplemagic.types.UtcLongDateType
 
getContentType() - Method in class com.j256.simplemagic.ContentInfo
Returns the internal enumerated type associated with the content or ContentType.OTHER if not known.
getConverter() - Method in enum com.j256.simplemagic.endian.EndianType
Returns the converter associated with this endian-type.
getFileExtensions() - Method in class com.j256.simplemagic.ContentInfo
Returns an array of associated file-extensions or null if none.
getFileExtensions() - Method in enum com.j256.simplemagic.ContentType
 
getLogger(Class<?>) - Static method in class com.j256.simplemagic.logger.LoggerFactory
Return a logger associated with a particular class.
getLogger(String) - Static method in class com.j256.simplemagic.logger.LoggerFactory
Return a logger associated with a particular class name.
getMessage() - Method in class com.j256.simplemagic.ContentInfo
Returns the full message as generated by the magic matching code or null if none.
getMimeType() - Method in class com.j256.simplemagic.ContentInfo
Returns the mime-type or null if none.
getMimeType() - Method in enum com.j256.simplemagic.ContentType
 
getMimeType() - Method in class com.j256.simplemagic.entries.IanaEntry
Returns the mime type.
getMimeTypeUrl() - Method in class com.j256.simplemagic.entries.IanaEntry
Returns the URL of the web page describing the mime type.
getName() - Method in class com.j256.simplemagic.ContentInfo
Returns the short name of the content either from the content-type or extracted from the message.
getName() - Method in class com.j256.simplemagic.entries.IanaEntry
Returns the name of the file type.
getReferences() - Method in enum com.j256.simplemagic.ContentType
Returns the references of the mime type or null if none.
getReferences() - Method in class com.j256.simplemagic.entries.IanaEntry
Returns the reference(s) of the mime type such as RFC documents.
getReferenceUrls() - Method in enum com.j256.simplemagic.ContentType
Returns the URL of the references or null if none.
getReferenceUrls() - Method in class com.j256.simplemagic.entries.IanaEntry
Returns the URL(s) of the reference(s) such as the URL of the RFC documents.
getSimpleClassName(String) - Static method in class com.j256.simplemagic.logger.LoggerFactory
Return the single class name from a class-name string.
getSimpleName() - Method in enum com.j256.simplemagic.ContentType
Get simple name of the type.
getStartingBytes(Object) - Method in interface com.j256.simplemagic.entries.MagicMatcher
Return the starting bytes of the pattern or null if none.
getStartingBytes(Object) - Method in class com.j256.simplemagic.types.BaseLongType
 
getStartingBytes(Object) - Method in class com.j256.simplemagic.types.DefaultType
 
getStartingBytes(Object) - Method in class com.j256.simplemagic.types.DoubleType
 
getStartingBytes(Object) - Method in class com.j256.simplemagic.types.RegexType
 
getStartingBytes(Object) - Method in class com.j256.simplemagic.types.StringType
 
getStartingBytes() - Method in class com.j256.simplemagic.types.StringType.TestInfo
Get the bytes that start the pattern from an optimization standpoint.
getValue() - Method in class com.j256.simplemagic.types.NumberComparison
 

I

IanaEntries - Class in com.j256.simplemagic.entries
Loads the IANA databases (build on 10 august 2017).
IanaEntries() - Constructor for class com.j256.simplemagic.entries.IanaEntries
 
IanaEntry - Class in com.j256.simplemagic.entries
IanaEntry(String, String, List<String>) - Constructor for class com.j256.simplemagic.entries.IanaEntry
 
Id3LengthType - Class in com.j256.simplemagic.types
A four-byte integer value where the high bit of each byte is ignored.
Id3LengthType(EndianType) - Constructor for class com.j256.simplemagic.types.Id3LengthType
 
info(String) - Method in class com.j256.simplemagic.logger.Logger
Log a info message.
info(String, Object) - Method in class com.j256.simplemagic.logger.Logger
Log a info message.
info(String, Object, Object) - Method in class com.j256.simplemagic.logger.Logger
Log a info message.
info(String, Object, Object, Object) - Method in class com.j256.simplemagic.logger.Logger
Log a info message.
info(String, Object[]) - Method in class com.j256.simplemagic.logger.Logger
Log a info message.
info(Throwable, String) - Method in class com.j256.simplemagic.logger.Logger
Log a info message with a throwable.
info(Throwable, String, Object) - Method in class com.j256.simplemagic.logger.Logger
Log a info message with a throwable.
info(Throwable, String, Object, Object) - Method in class com.j256.simplemagic.logger.Logger
Log a info message with a throwable.
info(Throwable, String, Object, Object, Object) - Method in class com.j256.simplemagic.logger.Logger
Log a info message with a throwable.
info(Throwable, String, Object[]) - Method in class com.j256.simplemagic.logger.Logger
Log a info message with a throwable.
IntegerType - Class in com.j256.simplemagic.types
A four-byte integer value which often handles the "long" types when the spec was written.
IntegerType(EndianType) - Constructor for class com.j256.simplemagic.types.IntegerType
 
isEnabled(Log.Level) - Method in enum com.j256.simplemagic.logger.Log.Level
Return whether or not a level argument is enabled for this level value.
isLevelEnabled(Log.Level) - Method in class com.j256.simplemagic.logger.CommonsLoggingLog
 
isLevelEnabled(Log.Level) - Method in class com.j256.simplemagic.logger.JavaUtilLog
 
isLevelEnabled(Log.Level) - Method in class com.j256.simplemagic.logger.LocalLog
 
isLevelEnabled(Log.Level) - Method in interface com.j256.simplemagic.logger.Log
Returns true if the log mode is in trace or higher.
isLevelEnabled(Log.Level) - Method in class com.j256.simplemagic.logger.Log4j2Log
 
isLevelEnabled(Log.Level) - Method in class com.j256.simplemagic.logger.Log4jLog
 
isLevelEnabled(Log.Level) - Method in class com.j256.simplemagic.logger.Logger
Return if logging level is enabled.
isLevelEnabled(Log.Level) - Method in class com.j256.simplemagic.logger.Slf4jLoggingLog
 
isMatch(Object, Long, boolean, Object, MagicMatcher.MutableOffset, byte[]) - Method in interface com.j256.simplemagic.entries.MagicMatcher
Matches if the bytes match at a certain offset.
isMatch(Object, Long, boolean, Object, MagicMatcher.MutableOffset, byte[]) - Method in class com.j256.simplemagic.types.BigEndianString16Type
 
isMatch(Object, Long, boolean, Object, MagicMatcher.MutableOffset, byte[]) - Method in class com.j256.simplemagic.types.DefaultType
 
isMatch(Long, boolean, Number) - Method in class com.j256.simplemagic.types.NumberComparison
 
isMatch(Object, Long, boolean, Object, MagicMatcher.MutableOffset, byte[]) - Method in class com.j256.simplemagic.types.NumberType
 
isMatch(Object, Long, boolean, Object, MagicMatcher.MutableOffset, byte[]) - Method in class com.j256.simplemagic.types.PStringType
 
isMatch(Object, Long, boolean, Object, MagicMatcher.MutableOffset, byte[]) - Method in class com.j256.simplemagic.types.RegexType
 
isMatch(Object, Long, boolean, Object, MagicMatcher.MutableOffset, byte[]) - Method in class com.j256.simplemagic.types.SearchType
 
isMatch(Object, Long, boolean, Object, MagicMatcher.MutableOffset, byte[]) - Method in class com.j256.simplemagic.types.StringType
 
isPartial() - Method in class com.j256.simplemagic.ContentInfo
Whether or not this was a partial match.

J

JavaUtilLog - Class in com.j256.simplemagic.logger
Class which logs to java.util.log.
JavaUtilLog(String) - Constructor for class com.j256.simplemagic.logger.JavaUtilLog
 

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
 
LOCAL_LOG_FILE_PROPERTY - Static variable in class com.j256.simplemagic.logger.LocalLog
 
LOCAL_LOG_LEVEL_PROPERTY - Static variable in class com.j256.simplemagic.logger.LocalLog
 
LOCAL_LOG_PROPERTIES_FILE - Static variable in class com.j256.simplemagic.logger.LocalLog
 
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
 
LocalLog - Class in com.j256.simplemagic.logger
Class which implements our Log interface so we can bypass external logging classes if they are not available.
LocalLog(String) - Constructor for class com.j256.simplemagic.logger.LocalLog
 
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
 
log(Log.Level, String) - Method in class com.j256.simplemagic.logger.CommonsLoggingLog
 
log(Log.Level, String, Throwable) - Method in class com.j256.simplemagic.logger.CommonsLoggingLog
 
log(Log.Level, String) - Method in class com.j256.simplemagic.logger.JavaUtilLog
 
log(Log.Level, String, Throwable) - Method in class com.j256.simplemagic.logger.JavaUtilLog
 
log(Log.Level, String) - Method in class com.j256.simplemagic.logger.LocalLog
 
log(Log.Level, String, Throwable) - Method in class com.j256.simplemagic.logger.LocalLog
 
Log - Interface in com.j256.simplemagic.logger
Interface so we can front various log code which may or may not be in the classpath.
log(Log.Level, String) - Method in interface com.j256.simplemagic.logger.Log
Log a trace message.
log(Log.Level, String, Throwable) - Method in interface com.j256.simplemagic.logger.Log
Log a trace message with a throwable.
log(Log.Level, String) - Method in class com.j256.simplemagic.logger.Log4j2Log
 
log(Log.Level, String, Throwable) - Method in class com.j256.simplemagic.logger.Log4j2Log
 
log(Log.Level, String) - Method in class com.j256.simplemagic.logger.Log4jLog
 
log(Log.Level, String, Throwable) - Method in class com.j256.simplemagic.logger.Log4jLog
 
log(Log.Level, String) - Method in class com.j256.simplemagic.logger.Logger
Log a message at the provided level.
log(Log.Level, String, Object) - Method in class com.j256.simplemagic.logger.Logger
Log a message at the provided level.
log(Log.Level, String, Object, Object) - Method in class com.j256.simplemagic.logger.Logger
Log a message at the provided level.
log(Log.Level, String, Object, Object, Object) - Method in class com.j256.simplemagic.logger.Logger
Log a message at the provided level.
log(Log.Level, String, Object[]) - Method in class com.j256.simplemagic.logger.Logger
Log a message at the provided level.
log(Log.Level, Throwable, String) - Method in class com.j256.simplemagic.logger.Logger
Log a message with a throwable at the provided level.
log(Log.Level, Throwable, String, Object) - Method in class com.j256.simplemagic.logger.Logger
Log a message with a throwable at the provided level.
log(Log.Level, Throwable, String, Object, Object) - Method in class com.j256.simplemagic.logger.Logger
Log a message with a throwable at the provided level.
log(Log.Level, Throwable, String, Object, Object, Object) - Method in class com.j256.simplemagic.logger.Logger
Log a message with a throwable at the provided level.
log(Log.Level, Throwable, String, Object[]) - Method in class com.j256.simplemagic.logger.Logger
Log a message with a throwable at the provided level.
log(Log.Level, String) - Method in class com.j256.simplemagic.logger.Slf4jLoggingLog
 
log(Log.Level, String, Throwable) - Method in class com.j256.simplemagic.logger.Slf4jLoggingLog
 
Log.Level - Enum in com.j256.simplemagic.logger
Level of log messages being sent.
Log4j2Log - Class in com.j256.simplemagic.logger
Class which implements our Log interface by delegating to Apache Log4j2.
Log4j2Log(String) - Constructor for class com.j256.simplemagic.logger.Log4j2Log
 
Log4jLog - Class in com.j256.simplemagic.logger
Class which implements our Log interface by delegating to Apache Log4j.
Log4jLog(String) - Constructor for class com.j256.simplemagic.logger.Log4jLog
 
LOG_TYPE_SYSTEM_PROPERTY - Static variable in class com.j256.simplemagic.logger.LoggerFactory
 
Logger - Class in com.j256.simplemagic.logger
Class which wraps our Log interface and provides {} argument features like slf4j.
Logger(Log) - Constructor for class com.j256.simplemagic.logger.Logger
 
LoggerFactory - Class in com.j256.simplemagic.logger
Factory that creates Logger instances.
longToObject(Long) - Method in class com.j256.simplemagic.types.DoubleType
Convert a long to the type.
longToObject(Long) - Method in class com.j256.simplemagic.types.FloatType
 
LongType - Class in com.j256.simplemagic.types
An eight-byte value constituted "quad" when the magic file spec was written.
LongType(EndianType) - Constructor for class com.j256.simplemagic.types.LongType
 
lookupByMimeType(String) - Method in class com.j256.simplemagic.entries.IanaEntries
Returns the IANA metadata for a specific mime type or null if not found.

M

MagicEntries - Class in com.j256.simplemagic.entries
Class which encompasses a set of entries and allows us to optimize their use.
MagicEntries() - Constructor for class com.j256.simplemagic.entries.MagicEntries
 
MagicEntry - Class in com.j256.simplemagic.entries
Representation of a line of information from the magic (5) format.
MagicEntryParser - Class in com.j256.simplemagic.entries
Class which parses a line from the magic (5) format and produces a MagicEntry class.
MagicEntryParser() - Constructor for class com.j256.simplemagic.entries.MagicEntryParser
 
MagicFormatter - Class in com.j256.simplemagic.entries
Formatter that handles the C %0.2f type formats appropriately.
MagicFormatter(String) - Constructor for class com.j256.simplemagic.entries.MagicFormatter
This takes a format string, breaks it up into prefix, %-thang, and suffix.
MagicMatcher - Interface in com.j256.simplemagic.entries
Classes which are able to match content according to operations and output description.
MagicMatcher.MutableOffset - Class in com.j256.simplemagic.entries
Offset which we can update.
MagicType - Enum in com.j256.simplemagic.entries
The various types which correspond to the "type" part of the magic (5) format.
mark(int) - Method in class com.j256.simplemagic.ContentInfoInputStreamWrapper
 
markSupported() - Method in class com.j256.simplemagic.ContentInfoInputStreamWrapper
 
maskValue(long) - Method in class com.j256.simplemagic.types.ByteType
 
maskValue(long) - Method in class com.j256.simplemagic.types.DoubleType
 
maskValue(long) - Method in class com.j256.simplemagic.types.IntegerType
 
maskValue(long) - Method in class com.j256.simplemagic.types.LongType
 
maskValue(long) - Method in class com.j256.simplemagic.types.NumberType
Return the value with the appropriate bytes masked off corresponding to the bytes in the type.
maskValue(long) - Method in class com.j256.simplemagic.types.ShortType
 
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.
MutableOffset(int) - Constructor for class com.j256.simplemagic.entries.MagicMatcher.MutableOffset
 

N

NumberComparison - Class in com.j256.simplemagic.types
Internal class that compares a number from the bytes with the value from the magic rule.
NumberComparison(NumberType, String) - Constructor for class com.j256.simplemagic.types.NumberComparison
Pre-process the test string into an operator and a value.
NumberType - Class in com.j256.simplemagic.types
Base class for our numbers so we can do generic operations on them.
NumberType(EndianType) - Constructor for class com.j256.simplemagic.types.NumberType
 

O

offset - Variable in class com.j256.simplemagic.entries.MagicMatcher.MutableOffset
 
openLogFile(String) - Static method in class com.j256.simplemagic.logger.LocalLog
Reopen the associated static logging stream.
optimizeFirstBytes() - Method in class com.j256.simplemagic.entries.MagicEntries
Optimize the magic entries by removing the first-bytes information into their own lists

P

parseLine(MagicEntry, String, ContentInfoUtil.ErrorCallBack) - Static method in class com.j256.simplemagic.entries.MagicEntryParser
Parse a line from the magic configuration file into an entry.
PATTERN_MODIFIERS - Static variable in class com.j256.simplemagic.entries.MagicFormatter
 
PatternUtils - Class in com.j256.simplemagic.types
Some common pattern utilities used by multiple types.
PatternUtils() - Constructor for class com.j256.simplemagic.types.PatternUtils
 
PercentExpression - Class in com.j256.simplemagic.entries
Representation of our percent expression used by the MagicFormatter class.
preProcessPattern(String) - Static method in class com.j256.simplemagic.types.PatternUtils
Pre-processes the pattern by handling backslash escapes such as \b and \007.
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

read() - Method in class com.j256.simplemagic.ContentInfoInputStreamWrapper
 
read(byte[], int, int) - Method in class com.j256.simplemagic.ContentInfoInputStreamWrapper
 
readEntries(BufferedReader, ContentInfoUtil.ErrorCallBack) - Method in class com.j256.simplemagic.entries.MagicEntries
Read the entries so later we can find matches with them.
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, MagicFormatter) - Method in interface com.j256.simplemagic.entries.MagicMatcher
Returns the string version of the extracted value.
renderValue(StringBuilder, Object, MagicFormatter) - Method in class com.j256.simplemagic.types.DefaultType
 
renderValue(StringBuilder, Object, MagicFormatter) - Method in class com.j256.simplemagic.types.LocalDateType
 
renderValue(StringBuilder, Object, MagicFormatter) - Method in class com.j256.simplemagic.types.NumberType
 
renderValue(StringBuilder, Object, MagicFormatter) - Method in class com.j256.simplemagic.types.RegexType
 
renderValue(StringBuilder, Object, MagicFormatter) - Method in class com.j256.simplemagic.types.StringType
 
reset() - Method in class com.j256.simplemagic.ContentInfoInputStreamWrapper
 

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(ContentInfoUtil.ErrorCallBack) - Method in class com.j256.simplemagic.ContentInfoUtil
Deprecated.
Not used since it is only passed into the constructor.
setFileReadSize(int) - Method in class com.j256.simplemagic.ContentInfoUtil
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
 
skip(long) - Method in class com.j256.simplemagic.ContentInfoInputStreamWrapper
 
Slf4jLoggingLog - Class in com.j256.simplemagic.logger
Class which implements our Log interface by delegating to slf4j.
Slf4jLoggingLog(String) - Constructor for class com.j256.simplemagic.logger.Slf4jLoggingLog
 
staticCompare(Number, Number) - Static method in class com.j256.simplemagic.types.LongType
Static compare of longs which are unsigned or signed.
StringOperator - Enum in com.j256.simplemagic.types
Internal class that provides information about a particular test.
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.TestInfo - Class in com.j256.simplemagic.types
Internal holder for test information about strings.

T

TestInfo(StringOperator, String, boolean, boolean, boolean, int) - Constructor for class com.j256.simplemagic.types.StringType.TestInfo
 
TestOperator - Enum in com.j256.simplemagic.types
Operators for tests.
toString() - Method in class com.j256.simplemagic.ContentInfo
 
toString() - Method in class com.j256.simplemagic.entries.MagicEntry
 
toString() - Method in class com.j256.simplemagic.entries.MagicFormatter
 
toString() - Method in class com.j256.simplemagic.entries.MagicMatcher.MutableOffset
 
toString() - Method in class com.j256.simplemagic.entries.PercentExpression
 
toString() - Method in class com.j256.simplemagic.types.NumberComparison
 
toString() - Method in class com.j256.simplemagic.types.StringType.TestInfo
 
trace(String) - Method in class com.j256.simplemagic.logger.Logger
Log a trace message.
trace(String, Object) - Method in class com.j256.simplemagic.logger.Logger
Log a trace message.
trace(String, Object, Object) - Method in class com.j256.simplemagic.logger.Logger
Log a trace message.
trace(String, Object, Object, Object) - Method in class com.j256.simplemagic.logger.Logger
Log a trace message.
trace(String, Object[]) - Method in class com.j256.simplemagic.logger.Logger
Log a trace message.
trace(Throwable, String) - Method in class com.j256.simplemagic.logger.Logger
Log a trace message with a throwable.
trace(Throwable, String, Object) - Method in class com.j256.simplemagic.logger.Logger
Log a trace message with a throwable.
trace(Throwable, String, Object, Object) - Method in class com.j256.simplemagic.logger.Logger
Log a trace message with a throwable.
trace(Throwable, String, Object, Object, Object) - Method in class com.j256.simplemagic.logger.Logger
Log a trace message with a throwable.
trace(Throwable, String, Object[]) - Method in class com.j256.simplemagic.logger.Logger
Log a trace message with a throwable.

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.ContentType
Returns the enum constant of this type with the specified name.
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.
valueOf(String) - Static method in enum com.j256.simplemagic.logger.Log.Level
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum com.j256.simplemagic.types.StringOperator
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum com.j256.simplemagic.types.TestOperator
Returns the enum constant of this type with the specified name.
values() - Static method in enum com.j256.simplemagic.ContentType
Returns an array containing the constants of this enum type, in the order they are declared.
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.
values() - Static method in enum com.j256.simplemagic.logger.Log.Level
Returns an array containing the constants of this enum type, in the order they are declared.
values() - Static method in enum com.j256.simplemagic.types.StringOperator
Returns an array containing the constants of this enum type, in the order they are declared.
values() - Static method in enum com.j256.simplemagic.types.TestOperator
Returns an array containing the constants of this enum type, in the order they are declared.

W

warn(String) - Method in class com.j256.simplemagic.logger.Logger
Log a warning message.
warn(String, Object) - Method in class com.j256.simplemagic.logger.Logger
Log a warning message.
warn(String, Object, Object) - Method in class com.j256.simplemagic.logger.Logger
Log a warning message.
warn(String, Object, Object, Object) - Method in class com.j256.simplemagic.logger.Logger
Log a warning message.
warn(String, Object[]) - Method in class com.j256.simplemagic.logger.Logger
Log a warning message.
warn(Throwable, String) - Method in class com.j256.simplemagic.logger.Logger
Log a warning message with a throwable.
warn(Throwable, String, Object) - Method in class com.j256.simplemagic.logger.Logger
Log a warning message with a throwable.
warn(Throwable, String, Object, Object) - Method in class com.j256.simplemagic.logger.Logger
Log a warning message with a throwable.
warn(Throwable, String, Object, Object, Object) - Method in class com.j256.simplemagic.logger.Logger
Log a warning message with a throwable.
warn(Throwable, String, Object[]) - Method in class com.j256.simplemagic.logger.Logger
Log a warning message with a throwable.
A B C D E F G I J L M N O P R S T U V W 
Skip navigation links

This content is licensed by Gray Watson under the Creative Commons Attribution-Share Alike 3.0 License.