@Test public void open_gzipContentEncoding_succeeds_whenContentEncodingSupported() throws Exception { MockHttpTransport transport = mockTransport( jsonDataResponse( newStorageObject(BUCKET_NAME, OBJECT_NAME).setContentEncoding("gzip"))); Storage storage = new Storage(transport, JSON_FACTORY, r -> {}); GoogleCloudStorageReadOptions readOptions = GoogleCloudStorageReadOptions.builder().setSupportGzipEncoding(true).build(); try (GoogleCloudStorageReadChannel channel = createReadChannel(storage, readOptions)) { channel.position(); } }
@Override public long position() throws IOException { throwIfNotOpen(); return currentPosition; }
GoogleCloudStorageReadChannel implements SeekableByteChannel { @Override public long position() throws IOException { throwIfNotOpen(); return currentPosition; } }
GoogleCloudStorageReadChannel implements SeekableByteChannel { @Override public long position() throws IOException { throwIfNotOpen(); return currentPosition; } 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 { @Override public long position() throws IOException { throwIfNotOpen(); return currentPosition; } 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 { @Override public long position() throws IOException { throwIfNotOpen(); return currentPosition; } 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();  }