/** * Overrides the {@link java.io.OutputStream#write(byte[])}. Writes the * specified byte to this output stream. * * @param b the data. * @throws IOException if an I/O error occurs. */ @Override public void write(int b) throws IOException { oneByteBuf[0] = (byte) (b & 0xff); write(oneByteBuf, 0, oneByteBuf.length); }
private void encryptMore() throws IOException { byteRawChannel.reset(); if (isByteBuf) { int copied = byteRawChannel.write(buf.nioBuffer()); buf.skipBytes(copied); } else { region.transferTo(byteRawChannel, region.transferred()); } cos.write(byteRawChannel.getData(), 0, byteRawChannel.length()); cos.flush(); currentEncrypted = ByteBuffer.wrap(byteEncChannel.getData(), 0, byteEncChannel.length()); }
private void encryptMore() throws IOException { byteRawChannel.reset(); if (isByteBuf) { int copied = byteRawChannel.write(buf.nioBuffer()); buf.skipBytes(copied); } else { region.transferTo(byteRawChannel, region.transfered()); } cos.write(byteRawChannel.getData(), 0, byteRawChannel.length()); cos.flush(); currentEncrypted = ByteBuffer.wrap(byteEncChannel.getData(), 0, byteEncChannel.length()); }
private void encryptMore() throws IOException { byteRawChannel.reset(); if (isByteBuf) { int copied = byteRawChannel.write(buf.nioBuffer()); buf.skipBytes(copied); } else { region.transferTo(byteRawChannel, region.transferred()); } cos.write(byteRawChannel.getData(), 0, byteRawChannel.length()); cos.flush(); currentEncrypted = ByteBuffer.wrap(byteEncChannel.getData(), 0, byteEncChannel.length()); }