-
- Enclosing interface:
- Store
public static interface Store.EntryReaderA reader for an entry's data stream.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default intread(java.nio.ByteBuffer dst)Synchronous variant ofread(ByteBuffer, Executor).default java.util.concurrent.CompletableFuture<java.lang.Integer>read(java.nio.ByteBuffer dst, java.util.concurrent.Executor executor)Reads as many bytes as possible from the data stream into the given buffer, and returns the number of read bytes, or-1if reached EOF.default longread(java.util.List<java.nio.ByteBuffer> dsts)Synchronous variant ofread(List, Executor).java.util.concurrent.CompletableFuture<java.lang.Long>read(java.util.List<java.nio.ByteBuffer> dsts, java.util.concurrent.Executor executor)Reads as many bytes as possible from the data stream into the given buffers, in sequential order, and returns the number of read bytes, or-1if reached EOF.
-
-
-
Method Detail
-
read
default int read(java.nio.ByteBuffer dst) throws java.io.IOExceptionSynchronous variant ofread(ByteBuffer, Executor).- Throws:
java.lang.IllegalStateException- if the viewer is closed or if a read is currently in progress and the store doesn't allow concurrent readsjava.io.IOException
-
read
default java.util.concurrent.CompletableFuture<java.lang.Integer> read(java.nio.ByteBuffer dst, java.util.concurrent.Executor executor)Reads as many bytes as possible from the data stream into the given buffer, and returns the number of read bytes, or-1if reached EOF. The number returned is the maximum of the number of bytes remaining in the buffer or the stream.- Throws:
java.lang.IllegalStateException- if the viewer is closed or if a read is currently in progress and the store doesn't allow concurrent reads
-
read
default long read(java.util.List<java.nio.ByteBuffer> dsts) throws java.io.IOExceptionSynchronous variant ofread(List, Executor).- Throws:
java.lang.IllegalStateException- if the viewer is closed or if a read is currently in progress and the store doesn't allow concurrent readsjava.io.IOException
-
read
java.util.concurrent.CompletableFuture<java.lang.Long> read(java.util.List<java.nio.ByteBuffer> dsts, java.util.concurrent.Executor executor)Reads as many bytes as possible from the data stream into the given buffers, in sequential order, and returns the number of read bytes, or-1if reached EOF. The number returned is the maximum of the number of bytes remaining in the buffer or the stream.- Throws:
java.lang.IllegalStateException- if the viewer is closed or if a read is currently in progress and the store doesn't allow concurrent reads
-
-