test_class.declarator: BUCKET_NAME = "bucket-name"
test_class.modifier: private static final
test_class.original_string: private static final String BUCKET_NAME = "bucket-name";
test_class.type: String
test_class.var_name: BUCKET_NAME
test_class.declarator: OBJECT_NAME = "object-name"
test_class.modifier: private static final
test_class.original_string: private static final String OBJECT_NAME = "object-name";
test_class.type: String
test_class.var_name: OBJECT_NAME
test_class.declarator: OBJECT_GENERATION = 7
test_class.modifier: private static final
test_class.original_string: private static final long OBJECT_GENERATION = 7;
test_class.type: long
test_class.var_name: OBJECT_GENERATION
test_class.declarator: OBJECT_SIZE =
        GoogleCloudStorageReadOptions.DEFAULT_MIN_RANGE_REQUEST_SIZE + 10
test_class.modifier: private static final
test_class.original_string: private static final int OBJECT_SIZE =
        GoogleCloudStorageReadOptions.DEFAULT_MIN_RANGE_REQUEST_SIZE + 10;
test_class.type: int
test_class.var_name: OBJECT_SIZE
test_class.declarator: DEFAULT_OBJECT_CRC32C = 185327488
test_class.modifier: private static final
test_class.original_string: private static final int DEFAULT_OBJECT_CRC32C = 185327488;
test_class.type: int
test_class.var_name: DEFAULT_OBJECT_CRC32C
test_class.declarator: DEFAULT_OBJECT =
        Object.newBuilder()
            .setBucket(BUCKET_NAME)
            .setName(OBJECT_NAME)
            .setSize(OBJECT_SIZE)
            .setCrc32C(UInt32Value.newBuilder().setValue(DEFAULT_OBJECT_CRC32C))
            .setGeneration(OBJECT_GENERATION)
            .build()
test_class.modifier: private static
test_class.original_string: private static Object DEFAULT_OBJECT =
        Object.newBuilder()
            .setBucket(BUCKET_NAME)
            .setName(OBJECT_NAME)
            .setSize(OBJECT_SIZE)
            .setCrc32C(UInt32Value.newBuilder().setValue(DEFAULT_OBJECT_CRC32C))
            .setGeneration(OBJECT_GENERATION)
            .build();
test_class.type: Object
test_class.var_name: DEFAULT_OBJECT
test_class.declarator: GET_OBJECT_REQUEST =
        GetObjectRequest.newBuilder().setBucket(BUCKET_NAME).setObject(OBJECT_NAME).build()
test_class.modifier: private static
test_class.original_string: private static GetObjectRequest GET_OBJECT_REQUEST =
        GetObjectRequest.newBuilder().setBucket(BUCKET_NAME).setObject(OBJECT_NAME).build();
test_class.type: GetObjectRequest
test_class.var_name: GET_OBJECT_REQUEST
test_class.declarator: GET_OBJECT_MEDIA_REQUEST =
        GetObjectMediaRequest.newBuilder()
            .setBucket(BUCKET_NAME)
            .setObject(OBJECT_NAME)
            .setGeneration(OBJECT_GENERATION)
            .build()
test_class.modifier: private static
test_class.original_string: private static GetObjectMediaRequest GET_OBJECT_MEDIA_REQUEST =
        GetObjectMediaRequest.newBuilder()
            .setBucket(BUCKET_NAME)
            .setObject(OBJECT_NAME)
            .setGeneration(OBJECT_GENERATION)
            .build();
test_class.type: GetObjectMediaRequest
test_class.var_name: GET_OBJECT_MEDIA_REQUEST
test_class.declarator: grpcCleanup = new GrpcCleanupRule()
test_class.modifier: @Rule public final
test_class.original_string: @Rule public final GrpcCleanupRule grpcCleanup = new GrpcCleanupRule();
test_class.type: GrpcCleanupRule
test_class.var_name: grpcCleanup
test_class.declarator: stub
test_class.modifier: private
test_class.original_string: private StorageBlockingStub stub;
test_class.type: StorageBlockingStub
test_class.var_name: stub
test_class.declarator: fakeService
test_class.modifier: private
test_class.original_string: private FakeService fakeService;
test_class.type: FakeService
test_class.var_name: fakeService
test_class.declarator: executor = Executors.newCachedThreadPool()
test_class.modifier: private
test_class.original_string: private ExecutorService executor = Executors.newCachedThreadPool();
test_class.type: ExecutorService
test_class.var_name: executor
test_class.file: gcsio/src/test/java/com/google/cloud/hadoop/gcsio/GoogleCloudStorageGrpcReadChannelTest.java
test_class.identifier: GoogleCloudStorageGrpcReadChannelTest
test_case.body: @Test
    public void positionUpdatesOnSeek() throws Exception {
      GoogleCloudStorageGrpcReadChannel readChannel = newReadChannel();
  
      readChannel.position(50);
  
      assertEquals(50, readChannel.position());
    }
test_case.class_method_signature: GoogleCloudStorageGrpcReadChannelTest.positionUpdatesOnSeek()
test_case.full_signature: @Test public void positionUpdatesOnSeek()
test_case.identifier: positionUpdatesOnSeek
test_case.invocations: newReadChannel position assertEquals position
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void positionUpdatesOnSeek()
focal_class.declarator: logger = GoogleLogger.forEnclosingClass()
focal_class.modifier: private static final
focal_class.original_string: private static final GoogleLogger logger = GoogleLogger.forEnclosingClass();
focal_class.type: GoogleLogger
focal_class.var_name: logger
focal_class.declarator: READ_STREAM_TIMEOUT = Duration.ofMinutes(20)
focal_class.modifier: private static final
focal_class.original_string: private static final Duration READ_STREAM_TIMEOUT = Duration.ofMinutes(20);
focal_class.type: Duration
focal_class.var_name: READ_STREAM_TIMEOUT
focal_class.declarator: requestContext
focal_class.modifier: @Nullable
focal_class.original_string: @Nullable CancellableContext requestContext;
focal_class.type: CancellableContext
focal_class.var_name: requestContext
focal_class.declarator: readStrategy
focal_class.original_string: Fadvise readStrategy;
focal_class.type: Fadvise
focal_class.var_name: readStrategy
focal_class.declarator: stub
focal_class.modifier: private
focal_class.original_string: private StorageBlockingStub stub;
focal_class.type: StorageBlockingStub
focal_class.var_name: stub
focal_class.declarator: bucketName
focal_class.modifier: private
focal_class.original_string: private String bucketName;
focal_class.type: String
focal_class.var_name: bucketName
focal_class.declarator: objectName
focal_class.modifier: private
focal_class.original_string: private String objectName;
focal_class.type: String
focal_class.var_name: objectName
focal_class.declarator: objectGeneration
focal_class.modifier: private
focal_class.original_string: private long objectGeneration;
focal_class.type: long
focal_class.var_name: objectGeneration
focal_class.declarator: objectSize
focal_class.modifier: private
focal_class.original_string: private long objectSize;
focal_class.type: long
focal_class.var_name: objectSize
focal_class.declarator: channelIsOpen = true
focal_class.modifier: private
focal_class.original_string: private boolean channelIsOpen = true;
focal_class.type: boolean
focal_class.var_name: channelIsOpen
focal_class.declarator: position = 0
focal_class.modifier: private
focal_class.original_string: private long position = 0;
focal_class.type: long
focal_class.var_name: position
focal_class.declarator: bytesToSkipBeforeReading = 0
focal_class.modifier: private
focal_class.original_string: private long bytesToSkipBeforeReading = 0;
focal_class.type: long
focal_class.var_name: bytesToSkipBeforeReading
focal_class.declarator: bufferedContent = null
focal_class.modifier: @Nullable private
focal_class.original_string: @Nullable private ByteString bufferedContent = null;
focal_class.type: ByteString
focal_class.var_name: bufferedContent
focal_class.declarator: bufferedContentReadOffset = 0
focal_class.modifier: private
focal_class.original_string: private int bufferedContentReadOffset = 0;
focal_class.type: int
focal_class.var_name: bufferedContentReadOffset
focal_class.declarator: resIterator = null
focal_class.modifier: @Nullable private
focal_class.original_string: @Nullable private Iterator<GetObjectMediaResponse> resIterator = null;
focal_class.type: Iterator<GetObjectMediaResponse>
focal_class.var_name: resIterator
focal_class.declarator: readOptions
focal_class.modifier: private
focal_class.original_string: private GoogleCloudStorageReadOptions readOptions;
focal_class.type: GoogleCloudStorageReadOptions
focal_class.var_name: readOptions
focal_class.file: gcsio/src/main/java/com/google/cloud/hadoop/gcsio/GoogleCloudStorageGrpcReadChannel.java
focal_class.identifier: GoogleCloudStorageGrpcReadChannel
focal_class.interfaces: implements SeekableByteChannel
focal_class.class_method_signature: GoogleCloudStorageGrpcReadChannel.GoogleCloudStorageGrpcReadChannel(
        StorageBlockingStub gcsGrpcBlockingStub,
        String bucketName,
        String objectName,
        long objectGeneration,
        long objectSize,
        GoogleCloudStorageReadOptions readOptions)
focal_class.full_signature: private  GoogleCloudStorageGrpcReadChannel(
        StorageBlockingStub gcsGrpcBlockingStub,
        String bucketName,
        String objectName,
        long objectGeneration,
        long objectSize,
        GoogleCloudStorageReadOptions readOptions)
focal_class.identifier: GoogleCloudStorageGrpcReadChannel
focal_class.modifiers: private
focal_class.parameters: (
        StorageBlockingStub gcsGrpcBlockingStub,
        String bucketName,
        String objectName,
        long objectGeneration,
        long objectSize,
        GoogleCloudStorageReadOptions readOptions)
focal_class.signature:  GoogleCloudStorageGrpcReadChannel(
        StorageBlockingStub gcsGrpcBlockingStub,
        String bucketName,
        String objectName,
        long objectGeneration,
        long objectSize,
        GoogleCloudStorageReadOptions readOptions)
focal_class.class_method_signature: GoogleCloudStorageGrpcReadChannel.open(
        StorageBlockingStub stub,
        String bucketName,
        String objectName,
        GoogleCloudStorageReadOptions readOptions)
focal_class.full_signature: public static GoogleCloudStorageGrpcReadChannel open(
        StorageBlockingStub stub,
        String bucketName,
        String objectName,
        GoogleCloudStorageReadOptions readOptions)
focal_class.identifier: open
focal_class.modifiers: public static
focal_class.parameters: (
        StorageBlockingStub stub,
        String bucketName,
        String objectName,
        GoogleCloudStorageReadOptions readOptions)
focal_class.return: GoogleCloudStorageGrpcReadChannel
focal_class.signature: GoogleCloudStorageGrpcReadChannel open(
        StorageBlockingStub stub,
        String bucketName,
        String objectName,
        GoogleCloudStorageReadOptions readOptions)
focal_class.class_method_signature: GoogleCloudStorageGrpcReadChannel.convertError(
        StatusRuntimeException error, String bucketName, String objectName)
focal_class.full_signature: private static IOException convertError(
        StatusRuntimeException error, String bucketName, String objectName)
focal_class.identifier: convertError
focal_class.modifiers: private static
focal_class.parameters: (
        StatusRuntimeException error, String bucketName, String objectName)
focal_class.return: IOException
focal_class.signature: IOException convertError(
        StatusRuntimeException error, String bucketName, String objectName)
focal_class.class_method_signature: GoogleCloudStorageGrpcReadChannel.put(ByteString source, int offset, int size, ByteBuffer dest)
focal_class.full_signature: private static final void put(ByteString source, int offset, int size, ByteBuffer dest)
focal_class.identifier: put
focal_class.modifiers: private static final
focal_class.parameters: (ByteString source, int offset, int size, ByteBuffer dest)
focal_class.return: void
focal_class.signature: void put(ByteString source, int offset, int size, ByteBuffer dest)
focal_class.class_method_signature: GoogleCloudStorageGrpcReadChannel.readBufferedContentInto(ByteBuffer byteBuffer)
focal_class.full_signature: private int readBufferedContentInto(ByteBuffer byteBuffer)
focal_class.identifier: readBufferedContentInto
focal_class.modifiers: private
focal_class.parameters: (ByteBuffer byteBuffer)
focal_class.return: int
focal_class.signature: int readBufferedContentInto(ByteBuffer byteBuffer)
focal_class.class_method_signature: GoogleCloudStorageGrpcReadChannel.read(ByteBuffer byteBuffer)
focal_class.full_signature: @Override public int read(ByteBuffer byteBuffer)
focal_class.identifier: read
focal_class.modifiers: @Override public
focal_class.parameters: (ByteBuffer byteBuffer)
focal_class.return: int
focal_class.signature: int read(ByteBuffer byteBuffer)
focal_class.class_method_signature: GoogleCloudStorageGrpcReadChannel.requestObjectMedia(OptionalLong bytesToRead)
focal_class.full_signature: private void requestObjectMedia(OptionalLong bytesToRead)
focal_class.identifier: requestObjectMedia
focal_class.modifiers: private
focal_class.parameters: (OptionalLong bytesToRead)
focal_class.return: void
focal_class.signature: void requestObjectMedia(OptionalLong bytesToRead)
focal_class.class_method_signature: GoogleCloudStorageGrpcReadChannel.cancelCurrentRequest()
focal_class.full_signature: private void cancelCurrentRequest()
focal_class.identifier: cancelCurrentRequest
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void cancelCurrentRequest()
focal_class.class_method_signature: GoogleCloudStorageGrpcReadChannel.moreServerContent()
focal_class.full_signature: private boolean moreServerContent()
focal_class.identifier: moreServerContent
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean moreServerContent()
focal_class.class_method_signature: GoogleCloudStorageGrpcReadChannel.write(ByteBuffer byteBuffer)
focal_class.full_signature: @Override public int write(ByteBuffer byteBuffer)
focal_class.identifier: write
focal_class.modifiers: @Override public
focal_class.parameters: (ByteBuffer byteBuffer)
focal_class.return: int
focal_class.signature: int write(ByteBuffer byteBuffer)
focal_class.class_method_signature: GoogleCloudStorageGrpcReadChannel.position()
focal_class.full_signature: @Override public long position()
focal_class.identifier: position
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: long
focal_class.signature: long position()
focal_class.class_method_signature: GoogleCloudStorageGrpcReadChannel.resourceIdString()
focal_class.full_signature: private String resourceIdString()
focal_class.identifier: resourceIdString
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String resourceIdString()
focal_class.class_method_signature: GoogleCloudStorageGrpcReadChannel.position(long newPosition)
focal_class.full_signature: @Override public SeekableByteChannel position(long newPosition)
focal_class.identifier: position
focal_class.modifiers: @Override public
focal_class.parameters: (long newPosition)
focal_class.return: SeekableByteChannel
focal_class.signature: SeekableByteChannel position(long newPosition)
focal_class.class_method_signature: GoogleCloudStorageGrpcReadChannel.size()
focal_class.full_signature: @Override public long size()
focal_class.identifier: size
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: long
focal_class.signature: long size()
focal_class.class_method_signature: GoogleCloudStorageGrpcReadChannel.truncate(long l)
focal_class.full_signature: @Override public SeekableByteChannel truncate(long l)
focal_class.identifier: truncate
focal_class.modifiers: @Override public
focal_class.parameters: (long l)
focal_class.return: SeekableByteChannel
focal_class.signature: SeekableByteChannel truncate(long l)
focal_class.class_method_signature: GoogleCloudStorageGrpcReadChannel.isOpen()
focal_class.full_signature: @Override public boolean isOpen()
focal_class.identifier: isOpen
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isOpen()
focal_class.class_method_signature: GoogleCloudStorageGrpcReadChannel.close()
focal_class.full_signature: @Override public void close()
focal_class.identifier: close
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void close()
focal_class.class_method_signature: GoogleCloudStorageGrpcReadChannel.toString()
focal_class.full_signature: @Override public String toString()
focal_class.identifier: toString
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String toString()
focal_method.body: @Override
    public long position() throws IOException {
      if (!isOpen()) {
        throw new ClosedChannelException();
      }
      // Our real position is tracked in "position," but if the user is skipping forwards a bit, we
      // pretend we're at the new position already.
      return position + bytesToSkipBeforeReading;
    }
focal_method.class_method_signature: GoogleCloudStorageGrpcReadChannel.position()
focal_method.full_signature: @Override public long position()
focal_method.identifier: position
focal_method.invocations: isOpen
focal_method.modifiers: @Override public
focal_method.parameters: ()
focal_method.return: long
focal_method.signature: long position()