/** * 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(); }
checkStream(); if (b == null) { throw new NullPointerException();
checkStream(); final int len = src.remaining(); int remaining = len;