in src/java/org/apache/fulcrum/jce/crypto/SmartDecryptingInputStream.java [182:200]
public long copy( InputStream is, OutputStream os )
throws IOException
{
byte[] buf = new byte[1024];
int n = 0;
long total = 0;
while ((n = is.read(buf)) > 0)
{
os.write(buf, 0, n);
total += n;
}
is.close();
os.flush();
os.close();
return total;
}