public interface UncheckedRandomDataInput
Note: Calling these methods without proper boundary checks can lead to undefined results and even JVM crashes.
Modifier and Type | Method and Description |
---|---|
byte |
readByte(long offset)
Read a byte at an offset possibly not checking memory bounds.
|
int |
readInt(long offset)
Read an int at an offset possibly not checking memory bounds.
|
long |
readLong(long offset)
Read a long at an offset possibly not checking memory bounds.
|
short |
readShort(long offset)
Read a short at an offset possibly not checking memory bounds.
|
byte readByte(long offset)
Memory bounds must be checked before invoking this method or else the result is undefined and may lead to JVM crashes.
offset
- Offset position from which the byte is to be read.BufferUnderflowException
- If the offset is beyond the boundary of the data source.IllegalStateException
- If the data source has been released.short readShort(long offset)
Memory bounds must be checked before invoking this method or else the result is undefined and may lead to JVM crashes.
offset
- Offset position from which the short is to be read.BufferUnderflowException
- If the offset is beyond the boundary of the data source.IllegalStateException
- If the data source has been released.int readInt(long offset)
Memory bounds must be checked before invoking this method or else the result is undefined and may lead to JVM crashes.
offset
- Offset position from which the integer is to be read.BufferUnderflowException
- If the offset is beyond the boundary of the data source.IllegalStateException
- If the data source has been released.long readLong(long offset)
Memory bounds must be checked before invoking this method or else the result is undefined and may lead to JVM crashes.
offset
- Offset position from which the long is to be read.BufferUnderflowException
- If the offset is beyond the boundary of the data source.IllegalStateException
- If the data source has been released.Copyright © 2023. All rights reserved.