com.j256.simplemagic.types
Class Id3LengthType

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

public class Id3LengthType
extends LongType

A four-byte integer value where the high bit of each byte is ignored.

Author:
graywatson

Field Summary
 
Fields inherited from class com.j256.simplemagic.types.LongType
endianConverter
 
Constructor Summary
Id3LengthType(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

Id3LengthType

public Id3LengthType(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.