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()); }