- 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
-
- 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
-
- 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
-
- 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
-
- 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.
- 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
-
- 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.
- 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.