while( (amountRead = input.read(buffer,0,1024)) != -1 )
{
getStandardOutput().write( buffer, 0, amountRead );
totalAmountWritten += amountRead;
}
lengthObject.setObject( new COSInteger( totalAmountWritten ) );
getStandardOutput().writeCRLF();
getStandardOutput().write(ENDSTREAM);
getStandardOutput().writeEOL();
return null;
}