Package io.github.jbellis.jvector.disk
Class ByteBufferReader
java.lang.Object
io.github.jbellis.jvector.disk.ByteBufferReader
- All Implemented Interfaces:
RandomAccessReader
,AutoCloseable
- Direct Known Subclasses:
SimpleMappedReader
RandomAccessReader that reads from a ByteBuffer
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
long
void
read
(float[] floats, int offset, int count) void
read
(int[] ints, int offset, int count) float
void
readFully
(byte[] b) void
readFully
(float[] buffer) void
readFully
(long[] vector) void
readFully
(ByteBuffer buffer) int
readInt()
void
seek
(long offset)
-
Field Details
-
bb
-
-
Constructor Details
-
ByteBufferReader
-
-
Method Details
-
seek
public void seek(long offset) - Specified by:
seek
in interfaceRandomAccessReader
-
getPosition
public long getPosition()- Specified by:
getPosition
in interfaceRandomAccessReader
-
readFully
public void readFully(float[] buffer) - Specified by:
readFully
in interfaceRandomAccessReader
-
readFully
public void readFully(byte[] b) - Specified by:
readFully
in interfaceRandomAccessReader
-
readFully
- Specified by:
readFully
in interfaceRandomAccessReader
-
readFully
public void readFully(long[] vector) - Specified by:
readFully
in interfaceRandomAccessReader
-
readInt
public int readInt()- Specified by:
readInt
in interfaceRandomAccessReader
-
readFloat
- Specified by:
readFloat
in interfaceRandomAccessReader
- Throws:
IOException
-
read
public void read(int[] ints, int offset, int count) - Specified by:
read
in interfaceRandomAccessReader
-
read
public void read(float[] floats, int offset, int count) - Specified by:
read
in interfaceRandomAccessReader
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceRandomAccessReader
-