+ " bytes at offset " + String.format("0x%x", offset)
+ "; isFinalChunk: " + isFinalChunk + ")");
}
long limit = offset + length;
Map<String, String> queryStrings = Collections.singletonMap(UPLOAD_ID, token.uploadId);
final HTTPRequest req = makeRequest(token.filename, queryStrings, PUT, timeoutMillis, headers);
req.setHeader(
new HTTPHeader(CONTENT_RANGE,
"bytes " + (length == 0 ? "*" : offset + "-" + (limit - 1))
+ (isFinalChunk ? "/" + limit : "/*")));
req.setPayload(peekBytes(chunk));
return req;
}