com.j256.simplemagic.types
Class IntegerType

java.lang.Object
  extended by com.j256.simplemagic.types.LongType
      extended by com.j256.simplemagic.types.IntegerType
All Implemented Interfaces:
MagicMatcher
Direct Known Subclasses:
LocalDateType

public class IntegerType
extends LongType

A four-byte integer value.

Author:
graywatson

Field Summary
 
Fields inherited from class com.j256.simplemagic.types.LongType
endianConverter
 
Constructor Summary
IntegerType(EndianType endianType)
           
 
Method Summary
 Object 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

IntegerType

public IntegerType(EndianType endianType)
Method Detail

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