/** * Writes the specified byte to this output stream. * * @param b the <code>byte</code>. * @throws java.io.IOException if an I/O error occurs. */ public void write( int b) throws IOException { oneByte[0] = (byte)b; if (streamCipher != null) { out.write(streamCipher.returnByte((byte)b)); } else { write(oneByte, 0, 1); } }
/** * Writes the specified byte to this output stream. * * @param b the <code>byte</code>. * @exception java.io.IOException if an I/O error occurs. */ public void write( int b) throws IOException { oneByte[0] = (byte)b; if (bufferedBlockCipher != null) { int len = bufferedBlockCipher.processBytes(oneByte, 0, 1, buf, 0); if (len != 0) { out.write(buf, 0, len); } } else { out.write(streamCipher.returnByte((byte)b)); } }