com.j256.simplemagic.types
Class BigEndianString16Type
java.lang.Object
com.j256.simplemagic.types.StringType
com.j256.simplemagic.types.BigEndianString16Type
- All Implemented Interfaces:
- MagicMatcher
- Direct Known Subclasses:
- LittleEndianString16Type
public class BigEndianString16Type
- extends StringType
A two-byte unicode (UCS16) string in big-endian byte order.
- Author:
- graywatson
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BigEndianString16Type
public BigEndianString16Type()
extractValueFromBytes
public Object 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 StringType
- Returns:
- The object to be passed to
MagicMatcher.isMatch(Object, Long, boolean, Object, int, byte[])
or null if not
enough bytes.
bytesToChar
protected char bytesToChar(int firstByte,
int secondByte)
This content is licensed by Gray Watson under the Creative Commons Attribution-Share Alike 3.0 License.