com.j256.simplemagic.types
Class ByteType

java.lang.Object
  extended by com.j256.simplemagic.types.LongType
      extended by com.j256.simplemagic.types.ByteType
All Implemented Interfaces:
MagicMatcher

public class ByteType
extends LongType

A one-byte value.

Author:
graywatson

Field Summary
 
Fields inherited from class com.j256.simplemagic.types.LongType
endianConverter
 
Constructor Summary
ByteType()
           
 
Method Summary
 Long extractValueFromBytes(int offset, byte[] bytes)
          Extract the value from the bytes.
 
Methods inherited from class com.j256.simplemagic.types.LongType
convertTestString, isMatch, renderValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ByteType

public ByteType()
Method Detail

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.