com.j256.simplemagic.endian
Class BigEndianConverter

java.lang.Object
  extended by com.j256.simplemagic.endian.BigEndianConverter
All Implemented Interfaces:
EndianConverter

public class BigEndianConverter
extends Object
implements EndianConverter

Converts values in "big" endian-ness where the high-order bytes come before the low-order (ABCD). Also called network byte order. Big is better. Motorola 68000 processors.

Author:
graywatson

Method Summary
 Long convertNumber(int offset, byte[] bytes, int size)
          Convert a number of bytes starting at an offset into a long integer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

convertNumber

public Long convertNumber(int offset,
                          byte[] bytes,
                          int size)
Description copied from interface: EndianConverter
Convert a number of bytes starting at an offset into a long integer.

Specified by:
convertNumber in interface EndianConverter
Returns:
The long or null if not enough bytes.


This content is licensed by Gray Watson under the Creative Commons Attribution-Share Alike 3.0 License.