code: private RawGcsCreationToken put(final GcsRestCreationToken token, ByteBuffer chunk,
        final boolean isFinalChunk, long timeoutMillis) throws IOException {
      final int length = chunk.remaining();
      HTTPRequest req = createPutRequest(token, chunk, isFinalChunk, timeoutMillis, length);
      HTTPRequestInfo info = new HTTPRequestInfo(req);
      HTTPResponse response;
      try {
        response = urlfetch.fetch(req);
      } catch (IOException e) {
        throw createIOException(info, e);
      }
      return handlePutResponse(token, isFinalChunk, length, info, response);
    }
docs: Write the provided chunk at the offset specified in the token. If finalChunk is set, the file
  will be closed.