public class InMemoryObjectReadChannel extends GoogleCloudStorageReadChannel
contentChannelPosition, currentPosition, metadataInitialized| Constructor and Description |
|---|
InMemoryObjectReadChannel(String bucketName,
String objectName,
byte[] content,
GoogleCloudStorageReadOptions readOptions)
Creates a new instance of InMemoryObjectReadChannel with
readOptions plumbed into the
base class. |
| Modifier and Type | Method and Description |
|---|---|
protected GoogleCloudStorageItemInfo |
getInitialMetadata()
Returns
GoogleCloudStorageItemInfo used to initialize metadata in constructor or null if GoogleCloudStorageReadOptions.getFastFailOnNotFound() is set to false. |
protected InputStream |
openStream(long bytesToRead)
Opens the underlying byte array stream, sets its position to currentPosition and sets size to
size of the byte array.
|
close, closeContentChannel, createDataRequest, createMetadataRequest, initMetadata, initMetadata, isOpen, position, position, read, setMaxRetries, setSize, size, truncate, validatePosition, writepublic InMemoryObjectReadChannel(String bucketName, String objectName, byte[] content, GoogleCloudStorageReadOptions readOptions) throws IOException
readOptions plumbed into the
base class.IOException@Nullable protected GoogleCloudStorageItemInfo getInitialMetadata() throws IOException
GoogleCloudStorageReadChannelGoogleCloudStorageItemInfo used to initialize metadata in constructor or null if GoogleCloudStorageReadOptions.getFastFailOnNotFound() is set to false.getInitialMetadata in class GoogleCloudStorageReadChannelIOExceptionprotected InputStream openStream(long bytesToRead) throws IOException
openStream in class GoogleCloudStorageReadChannelbytesToRead - ignored.IOException - on IO errorCopyright © 2022. All rights reserved.