public interface ReadChannel extends ReadableByteChannel, Closeable, Restorable<ReadChannel>
A channel for reading data from a Google Cloud object.
Implementations of this class may buffer data internally to reduce remote calls. This interface implements Restorable to allow saving the reader's state to continue reading afterwards.
Implements
ReadableByteChannel, Closeable, com.google.cloud.Restorable<com.google.cloud.ReadChannel>Methods
capture()
public abstract RestorableState<ReadChannel> capture()
Captures the read channel state so that it can be saved and restored afterwards.
Type | Description |
RestorableState<ReadChannel> | a RestorableState object that contains the read channel state and can restore it afterwards. |
close()
public abstract void close()
Overridden to remove IOException. See Also: java.nio.channels.Channel#close()
seek(long position)
public abstract void seek(long position)
Name | Description |
position | long |
Type | Description |
IOException |
setChunkSize(int chunkSize)
public abstract void setChunkSize(int chunkSize)
Sets the minimum size that will be read by a single RPC. Read data will be locally buffered until consumed.
Name | Description |
chunkSize | int |