@ThreadSafe @DefaultAnnotation(value=edu.umd.cs.findbugs.annotations.NonNull.class) final class LittleEndian extends Object
| Modifier | Constructor and Description |
|---|---|
private |
LittleEndian()
This class cannot get instantiated.
|
| Modifier and Type | Method and Description |
|---|---|
(package private) static byte |
readByte(byte[] buf,
int off)
Reads a signed byte integer value from the byte array
buf at the offset off. |
(package private) static int |
readInt(byte[] buf,
int off)
Reads a signed integer value from the byte array
buf at the offset off
as four bytes, low byte first. |
(package private) static long |
readLong(byte[] buf,
int off)
Reads a (signed) long integer value from the byte array
buf at the offset off
as eight bytes, low byte first. |
(package private) static int |
readShort(byte[] buf,
int off)
Reads a signed short integer value from the byte array
buf at the offset off
as two bytes, low byte first. |
(package private) static int |
readUByte(byte[] buf,
int off)
Reads an unsigned byte integer value from the byte array
buf at the offset off. |
(package private) static long |
readUInt(byte[] buf,
int off)
Reads an unsigned integer value from the byte array
buf at the offset off
as four bytes, low byte first. |
(package private) static int |
readUShort(byte[] buf,
int off)
Reads an unsigned short integer value from the byte array
buf at the offset off
as two bytes, low byte first. |
(package private) static void |
writeByte(int b,
byte[] buf,
int off)
Writes the integer value
b to the byte array
buf at the zero based offset off
as one byte. |
(package private) static void |
writeInt(int i,
byte[] buf,
int off)
Writes the integer value
i to the byte array
buf at the zero based offset off
as four bytes, low byte first. |
(package private) static void |
writeLong(long l,
byte[] buf,
int off)
Writes the long integer value
l to the byte array
buf at the zero based offset off
as eight bytes, low byte first. |
(package private) static void |
writeShort(int s,
byte[] buf,
int off)
Writes the integer value
s to the byte array
buf at the zero based offset off
as two bytes, low byte first. |
static byte readByte(byte[] buf,
int off)
buf at the offset off.buf - The byte array to read the signed byte integer value from.off - The zero based offset in the byte array where the signed
byte integer value is read from.static int readInt(byte[] buf,
int off)
buf at the offset off
as four bytes, low byte first.buf - The byte array to read the signed integer value from.off - The zero based offset in the byte array where the first byte
of the signed integer value is read from.static long readLong(byte[] buf,
int off)
buf at the offset off
as eight bytes, low byte first.buf - The byte array to read the signed long integer value from.off - The zero based offset in the byte array where the first byte
of the (signed) long integer value is read from.static int readShort(byte[] buf,
int off)
buf at the offset off
as two bytes, low byte first.buf - The byte array to read the signed short integer value from.off - The zero based offset in the byte array where the first byte
of the signed short integer value is read from.static int readUByte(byte[] buf,
int off)
buf at the offset off.
Note that it is not necessary to check the return value with
UByte.check(int, java.lang.String, java.lang.String).buf - The byte array to read the unsigned byte integer value from.off - The zero based offset in the byte array where the unsigned
byte integer value is read from.unsigned short as a primitive
type, hence an int is returned which's three most
significant bytes are zero.static long readUInt(byte[] buf,
int off)
buf at the offset off
as four bytes, low byte first.
Note that it is not necessary to check the return value with
UInt.check(long, java.lang.String, java.lang.String).buf - The byte array to read the unsigned integer value from.off - The zero based offset in the byte array where the first byte
of the unsigned integer value is read from.unsigned int as a primitive
type, hence a long is returned which's four most
significant bytes are zero.static int readUShort(byte[] buf,
int off)
buf at the offset off
as two bytes, low byte first.
Note that it is not necessary to check the return value with
UShort.check(int, java.lang.String, java.lang.String).buf - The byte array to read the unsigned short integer value from.off - The zero based offset in the byte array where the first byte
of the unsigned short integer value is read from.unsigned short as a primitive
type, hence an int is returned which's two most
significant bytes are zero.static void writeByte(int b,
byte[] buf,
int off)
b to the byte array
buf at the zero based offset off
as one byte.
The most significant three bytes of the integer value are ignored.b - The integer value to be written.buf - The byte array to write the integer value to.off - The zero based offset in the byte array where the byte
of the integer value is written to.static void writeInt(int i,
byte[] buf,
int off)
i to the byte array
buf at the zero based offset off
as four bytes, low byte first.i - The integer value to be written.buf - The byte array to write the integer value to.off - The zero based offset in the byte array where the first byte
of the integer value is written to.static void writeLong(long l,
byte[] buf,
int off)
l to the byte array
buf at the zero based offset off
as eight bytes, low byte first.l - The long integer value to be written.buf - The byte array to write the long integer value to.off - The zero based offset in the byte array where the first byte
of the long integer value is written to.static void writeShort(int s,
byte[] buf,
int off)
s to the byte array
buf at the zero based offset off
as two bytes, low byte first.
The most significant two bytes of the integer value are ignored.s - The integer value to be written.buf - The byte array to write the integer value to.off - The zero based offset in the byte array where the first byte
of the integer value is written to.Copyright © 2004-2011 Schlichtherle IT Services. All Rights Reserved.