@Test public void initMetadata_succeeds_whenReadConsistencyEnabledAndGenerationIsValid() throws IOException { Storage storage = new Storage(HTTP_TRANSPORT, JSON_FACTORY, r -> {}); GoogleCloudStorageReadOptions options = newLazyReadOptionsBuilder() .build(); GoogleCloudStorageReadChannel readChannel = createReadChannel(storage, options); readChannel.initMetadata("gzip", 1, 1234L); }
private void initMetadata(GoogleCloudStorageItemInfo info) throws IOException { initMetadata(info.getContentEncoding(), info.getSize(), info.getContentGeneration()); }
GoogleCloudStorageReadChannel implements SeekableByteChannel { private void initMetadata(GoogleCloudStorageItemInfo info) throws IOException { initMetadata(info.getContentEncoding(), info.getSize(), info.getContentGeneration()); } }
GoogleCloudStorageReadChannel implements SeekableByteChannel { private void initMetadata(GoogleCloudStorageItemInfo info) throws IOException { initMetadata(info.getContentEncoding(), info.getSize(), info.getContentGeneration()); } GoogleCloudStorageReadChannel(
      Storage gcs,
      String bucketName,
      String objectName,
      ApiErrorExtractor errorExtractor,
      ClientRequestHelper<StorageObject> requestHelper);  GoogleCloudStorageReadChannel(
      Storage gcs,
      String bucketName,
      String objectName,
      ApiErrorExtractor errorExtractor,
      ClientRequestHelper<StorageObject> requestHelper,
      @Nonnull GoogleCloudStorageReadOptions readOptions);  GoogleCloudStorageReadChannel(
      Storage gcs,
      StorageResourceId resourceId,
      ApiErrorExtractor errorExtractor,
      ClientRequestHelper<StorageObject> requestHelper,
      @Nonnull GoogleCloudStorageReadOptions readOptions); protected  GoogleCloudStorageReadChannel(
      String bucketName, String objectName, @Nonnull GoogleCloudStorageReadOptions readOptions); }
GoogleCloudStorageReadChannel implements SeekableByteChannel { private void initMetadata(GoogleCloudStorageItemInfo info) throws IOException { initMetadata(info.getContentEncoding(), info.getSize(), info.getContentGeneration()); } GoogleCloudStorageReadChannel(
      Storage gcs,
      String bucketName,
      String objectName,
      ApiErrorExtractor errorExtractor,
      ClientRequestHelper<StorageObject> requestHelper);  GoogleCloudStorageReadChannel(
      Storage gcs,
      String bucketName,
      String objectName,
      ApiErrorExtractor errorExtractor,
      ClientRequestHelper<StorageObject> requestHelper,
      @Nonnull GoogleCloudStorageReadOptions readOptions);  GoogleCloudStorageReadChannel(
      Storage gcs,
      StorageResourceId resourceId,
      ApiErrorExtractor errorExtractor,
      ClientRequestHelper<StorageObject> requestHelper,
      @Nonnull GoogleCloudStorageReadOptions readOptions); protected  GoogleCloudStorageReadChannel(
      String bucketName, String objectName, @Nonnull GoogleCloudStorageReadOptions readOptions); void setMaxRetries(int maxRetries); @Override int read(ByteBuffer buffer); @Override SeekableByteChannel truncate(long size); @Override int write(ByteBuffer src); @Override boolean isOpen(); @Override void close(); @Override long position(); @Override SeekableByteChannel position(long newPosition); @Override long size(); }
GoogleCloudStorageReadChannel implements SeekableByteChannel { private void initMetadata(GoogleCloudStorageItemInfo info) throws IOException { initMetadata(info.getContentEncoding(), info.getSize(), info.getContentGeneration()); } GoogleCloudStorageReadChannel(
      Storage gcs,
      String bucketName,
      String objectName,
      ApiErrorExtractor errorExtractor,
      ClientRequestHelper<StorageObject> requestHelper);  GoogleCloudStorageReadChannel(
      Storage gcs,
      String bucketName,
      String objectName,
      ApiErrorExtractor errorExtractor,
      ClientRequestHelper<StorageObject> requestHelper,
      @Nonnull GoogleCloudStorageReadOptions readOptions);  GoogleCloudStorageReadChannel(
      Storage gcs,
      StorageResourceId resourceId,
      ApiErrorExtractor errorExtractor,
      ClientRequestHelper<StorageObject> requestHelper,
      @Nonnull GoogleCloudStorageReadOptions readOptions); protected  GoogleCloudStorageReadChannel(
      String bucketName, String objectName, @Nonnull GoogleCloudStorageReadOptions readOptions); void setMaxRetries(int maxRetries); @Override int read(ByteBuffer buffer); @Override SeekableByteChannel truncate(long size); @Override int write(ByteBuffer src); @Override boolean isOpen(); @Override void close(); @Override long position(); @Override SeekableByteChannel position(long newPosition); @Override long size();  }