*
* @throws IOException If there is an error compressing the stream.
*/
public void encode( InputStream rawData, OutputStream result, COSDictionary options ) throws IOException
{
ASCII85OutputStream os = new ASCII85OutputStream(result);
byte[] buffer = new byte[1024];
int amountRead = 0;
while( (amountRead = rawData.read( buffer, 0, 1024 )) != -1 )
{
os.write( buffer, 0, amountRead );
}
os.close();
result.flush();
}