@ParametersAreNonnullByDefault public class CompactLatin1CharSequenceAccess extends Access<byte[]>
| Modifier and Type | Method and Description |
|---|---|
ByteOrder |
byteOrder(byte[] input)
The byte order in which all multi-byte
getXXX() reads from the given input
are performed. |
int |
getByte(byte[] 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(byte[] input,
long offset)
Reads
[offset, offset + 3] bytes of the byte sequence represented by the given
input as a single int value. |
long |
getLong(byte[] input,
long offset)
Reads
[offset, offset + 7] bytes of the byte sequence represented by the given
input as a single long value. |
int |
getShort(byte[] 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(byte[] input,
long offset)
Shortcut for
getByte(input, offset) & 0xFF. |
long |
getUnsignedInt(byte[] input,
long offset)
Shortcut for
getInt(input, offset) & 0xFFFFFFFFL. |
int |
getUnsignedShort(byte[] input,
long offset)
Shortcut for
getShort(input, offset) & 0xFFFF. |
protected Access<byte[]> |
reverseAccess()
Get the
Access object with a different byte order. |
byteOrder, i16, i32, i64, i8, toByteBuffer, toCharSequence, toNativeCharSequence, u16, u32, u8, unsafepublic long getLong(byte[] 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<byte[]>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 int getInt(byte[] 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<byte[]>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 long getUnsignedInt(byte[] input,
long offset)
AccessgetInt(input, offset) & 0xFFFFFFFFL. Could be implemented more
efficiently.getUnsignedInt in class Access<byte[]>input - the object to accessoffset - offset to the first byte to read within the byte sequence represented
by the given objectpublic int getShort(byte[] 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<byte[]>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 getUnsignedShort(byte[] input,
long offset)
AccessgetShort(input, offset) & 0xFFFF. Could be implemented more
efficiently.getUnsignedShort in class Access<byte[]>input - the object to accessoffset - offset to the first byte to read within the byte sequence represented
by the given objectpublic int getByte(byte[] input,
long offset)
Accessoffset in the byte sequence represented by the given
input, returned widened to int.public int getUnsignedByte(byte[] input,
long offset)
AccessgetByte(input, offset) & 0xFF. Could be implemented more efficiently.getUnsignedByte in class Access<byte[]>input - the object to accessoffset - offset to the byte to read within the byte sequence represented
by the given objectoffset, interpreted as unsigned@NotNull public ByteOrder byteOrder(byte[] input)
AccessgetXXX() reads from the given input
are performed.@NotNull protected Access<byte[]> reverseAccess()
AccessAccess object with a different byte order. This method should
always return a fixed reference.reverseAccess in class Access<byte[]>Copyright © 2014–2022. All rights reserved.