com.j256.simplemagic.types
Class ShortType
java.lang.Object
com.j256.simplemagic.types.LongType
com.j256.simplemagic.types.ShortType
- All Implemented Interfaces:
- MagicMatcher
public class ShortType
- extends LongType
A two-byte value.
- Author:
- graywatson
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ShortType
public ShortType(EndianType endianType)
extractValueFromBytes
public Long extractValueFromBytes(int offset,
byte[] bytes)
- Description copied from interface:
MagicMatcher
- Extract the value from the bytes.
- Specified by:
extractValueFromBytes
in interface MagicMatcher
- Overrides:
extractValueFromBytes
in class LongType
- Returns:
- The object to be passed to
MagicMatcher.isMatch(Object, Long, boolean, Object, int, byte[])
or null if not
enough bytes.
This content is licensed by Gray Watson under the Creative Commons Attribution-Share Alike 3.0 License.