/** * Overrides the {@link OutputStream#flush()}. To flush, we need to encrypt * the data in the buffer and write to the underlying stream, then do the * flush. * * @throws IOException if an I/O error occurs. */ @Override public void flush() throws IOException { checkStream(); encrypt(); output.flush(); super.flush(); }
off += remaining; len -= remaining; encrypt();