code: GcsRestCreationToken handlePutResponse(final GcsRestCreationToken token,
        final boolean isFinalChunk,
        final int length,
        final HTTPRequestInfo reqInfo,
        HTTPResponse resp) throws Error, IOException {
      switch (resp.getResponseCode()) {
        case 200:
          if (!isFinalChunk) {
            throw new RuntimeException("Unexpected response code 200 on non-final chunk. Request: \n"
                + URLFetchUtils.describeRequestAndResponse(reqInfo, resp));
          } else {
            return null;
          }
        case 308:
          if (isFinalChunk) {
            throw new RuntimeException("Unexpected response code 308 on final chunk: "
                + URLFetchUtils.describeRequestAndResponse(reqInfo, resp));
          } else {
            return new GcsRestCreationToken(token.filename, token.uploadId, token.offset + length);
          }
        default:
          throw HttpErrorHandler.error(resp.getResponseCode(),
              URLFetchUtils.describeRequestAndResponse(reqInfo, resp));
      }
    }
docs: Given a HTTPResponce, process it, throwing an error if needed and return a Token for the next
  request.