| Modifier and Type | Method and Description |
|---|---|
ByteOrder |
byteOrder(Object input)
The byte order in which all multi-byte
getXXX() reads from the given input
are performed. |
int |
getByte(Object input,
long offset)
Reads a single byte at the given
offset in the byte sequence represented by the given
input, returned widened to int. |
int |
getInt(Object input,
long offset)
Reads
[offset, offset + 3] bytes of the byte sequence represented by the given
input as a single int value. |
long |
getLong(Object input,
long offset)
Reads
[offset, offset + 7] bytes of the byte sequence represented by the given
input as a single long value. |
int |
getShort(Object input,
long offset)
Reads
[offset, offset + 1] bytes of the byte sequence represented by the given
input as a single short value, returned widened to int. |
int |
getUnsignedByte(Object input,
long offset)
Shortcut for
getByte(input, offset) & 0xFF. |
long |
getUnsignedInt(Object input,
long offset)
Shortcut for
getInt(input, offset) & 0xFFFFFFFFL. |
int |
getUnsignedShort(Object input,
long offset)
Shortcut for
getShort(input, offset) & 0xFFFF. |
protected Access<Object> |
reverseAccess()
Get the
Access object with a different byte order. |
byteOrder, i16, i32, i64, i8, toByteBuffer, toCharSequence, toNativeCharSequence, u16, u32, u8, unsafepublic long getLong(Object input, long offset)
Access[offset, offset + 7] bytes of the byte sequence represented by the given
input as a single long value.getLong in class Access<Object>input - the object to accessoffset - offset to the first byte to read within the byte sequence represented
by the given objectlong value, in the expected
orderpublic long getUnsignedInt(Object input, long offset)
AccessgetInt(input, offset) & 0xFFFFFFFFL. Could be implemented more
efficiently.getUnsignedInt in class Access<Object>input - the object to accessoffset - offset to the first byte to read within the byte sequence represented
by the given objectpublic int getInt(Object input, long offset)
Access[offset, offset + 3] bytes of the byte sequence represented by the given
input as a single int value.getInt in class Access<Object>input - the object to accessoffset - offset to the first byte to read within the byte sequence represented
by the given objectint value, in the expected
orderpublic int getUnsignedShort(Object input, long offset)
AccessgetShort(input, offset) & 0xFFFF. Could be implemented more
efficiently.getUnsignedShort in class Access<Object>input - the object to accessoffset - offset to the first byte to read within the byte sequence represented
by the given objectpublic int getShort(Object input, long offset)
Access[offset, offset + 1] bytes of the byte sequence represented by the given
input as a single short value, returned widened to int.getShort in class Access<Object>input - the object to accessoffset - offset to the first byte to read within the byte sequence represented
by the given objectshort value, in the expected
order, widened to intpublic int getUnsignedByte(Object input, long offset)
AccessgetByte(input, offset) & 0xFF. Could be implemented more efficiently.getUnsignedByte in class Access<Object>input - the object to accessoffset - offset to the byte to read within the byte sequence represented
by the given objectoffset, interpreted as unsignedpublic int getByte(Object input, long offset)
Accessoffset in the byte sequence represented by the given
input, returned widened to int.public ByteOrder byteOrder(Object input)
AccessgetXXX() reads from the given input
are performed.Copyright © 2014–2022. All rights reserved.