Package io.github.jbellis.jvector.disk
Class SimpleMappedReader
java.lang.Object
io.github.jbellis.jvector.disk.SimpleMappedReader
- All Implemented Interfaces:
RandomAccessReader,AutoCloseable
Simple sample implementation of RandomAccessReader.
It provides a bare minimum to run against disk in reasonable time.
Does not handle files above 2 GB.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
SimpleMappedReader
- Throws:
IOException
-
SimpleMappedReader
- Throws:
IOException
-
-
Method Details
-
seek
public void seek(long offset) - Specified by:
seekin interfaceRandomAccessReader
-
readFully
public void readFully(float[] buffer) - Specified by:
readFullyin interfaceRandomAccessReader
-
readFully
public void readFully(byte[] b) - Specified by:
readFullyin interfaceRandomAccessReader
-
readFully
- Specified by:
readFullyin interfaceRandomAccessReader- Throws:
IOException
-
readInt
public int readInt()- Specified by:
readIntin interfaceRandomAccessReader
-
read
public void read(int[] ints, int offset, int count) - Specified by:
readin interfaceRandomAccessReader
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceRandomAccessReader
-
duplicate
-