pos = c;
// Append until EOF.
try {
while((c = fillBuffer(buffer, in)) != -1) {
UpdateObjectRequest uor = new UpdateObjectRequest();
uor.setIdentifier(request.getIdentifier());
uor.setContentType(request.getContentType());
uor.setRange(new Range(pos, pos+c-1));
uor.setContent(new BufferSegment(buffer, 0, c));
pos += c;
delegate.updateObject(uor);
}
} catch (IOException e) {
throw new AtmosException("Error reading input data: " + e, e);