@ThreadSafe public interface PositionReader extends Closeable
Modifier and Type | Method and Description |
---|---|
default void |
close()
Closes the positon reader and do cleanup job if any.
|
default int |
read(long position,
byte[] buffer,
int length) |
default int |
read(long position,
byte[] buffer,
int offset,
int length) |
default int |
read(long position,
ByteBuffer buffer,
int length) |
default int |
read(long position,
io.netty.buffer.ByteBuf buffer,
int length) |
default int |
read(long position,
ReadTargetBuffer buffer,
int length) |
int |
readInternal(long position,
ReadTargetBuffer buffer,
int length) |
default int read(long position, byte[] buffer, int length) throws IOException
position
- position of the file to start reading databuffer
- target byte arraylength
- bytes to readIOException
default int read(long position, byte[] buffer, int offset, int length) throws IOException
position
- position of the file to start reading databuffer
- target byte arrayoffset
- the offset of the bufferlength
- bytes to readIOException
default int read(long position, ByteBuffer buffer, int length) throws IOException
position
- position of the file to start reading databuffer
- target byte bufferlength
- bytes to readIOException
default int read(long position, io.netty.buffer.ByteBuf buffer, int length) throws IOException
position
- position of the file to start reading databuffer
- target byte buflength
- bytes to readIOException
default int read(long position, ReadTargetBuffer buffer, int length) throws IOException
position
- position of the file to start reading databuffer
- target byte bufferlength
- bytes to readIOException
int readInternal(long position, ReadTargetBuffer buffer, int length) throws IOException
position
- position of the file to start reading databuffer
- target byte bufferlength
- bytes to readIOException
default void close() throws IOException
close
in interface AutoCloseable
close
in interface Closeable
IOException
Copyright © 2023. All Rights Reserved.