org.millscript.office.endianness
Class BigEndianDecoder
java.lang.Object
org.millscript.office.endianness.EndianDecoder
org.millscript.office.endianness.BigEndianDecoder
public class BigEndianDecoder
- extends EndianDecoder
This class provides support for reading information stored with a big endian
byte order.
|
Method Summary |
long |
decode8ByteLong(byte[] bytes,
int offset)
Reads 8 bytes of information from given offset(i.e. |
int |
decodeInt(byte byte1,
byte byte2)
Returns the integer value resulting from decoding the specified bytes as
an integer. |
int |
decodeInt(byte b1,
byte b2,
byte b3,
byte b4)
Returns the integer value resulting from decoding the specified bytes as
an integer. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DECODER
public static final BigEndianDecoder DECODER
BigEndianDecoder
public BigEndianDecoder()
decode8ByteLong
public long decode8ByteLong(byte[] bytes,
int offset)
- Description copied from class:
EndianDecoder
- Reads 8 bytes of information from given offset(i.e. zero based index)
into the specified byte array, decodes them and return the long value.
- Specified by:
decode8ByteLong in class EndianDecoder
- Parameters:
bytes - the byte array to decode an int fromoffset - the offset(zero based index) into the byte array to
- Returns:
- the long value of the 8 bytes at the specified position
- See Also:
EndianDecoder.decode8ByteLong(byte[], int)
decodeInt
public int decodeInt(byte byte1,
byte byte2)
- Description copied from class:
EndianDecoder
- Returns the integer value resulting from decoding the specified bytes as
an integer.
- Specified by:
decodeInt in class EndianDecoder
- Parameters:
byte1 - the first byte in the streambyte2 - the second byte in the stream
- Returns:
- the integer value resulting from decoding the given bytes
- See Also:
EndianDecoder.decodeInt(byte, byte)
decodeInt
public int decodeInt(byte b1,
byte b2,
byte b3,
byte b4)
- Description copied from class:
EndianDecoder
- Returns the integer value resulting from decoding the specified bytes as
an integer.
- Specified by:
decodeInt in class EndianDecoder
- Parameters:
b1 - the first byte in the streamb2 - the second byte in the streamb3 - the third byte in the streamb4 - the fourth byte in the stream
- Returns:
- the integer value resulting from decoding the given bytes
- See Also:
EndianDecoder.decodeInt(byte, byte, byte, byte)
Copyright © 2006-2007 Open World Ltd. All Rights Reserved.