Try using out.writerIndex instead of readerIndex

This commit is contained in:
md_5 2013-03-11 20:27:19 +11:00
parent 9edcda7ace
commit f9f664f9b6

View File

@ -43,7 +43,7 @@ public class CipherCodec extends ByteToByteCodec
{
out.capacity( outputSize );
}
int processed = cipher.update( in.nioBuffer(), out.nioBuffer( out.readerIndex(), outputSize ) );
int processed = cipher.update( in.nioBuffer(), out.nioBuffer( out.writerIndex(), outputSize ) );
in.readerIndex( in.readerIndex() + processed );
out.writerIndex( out.writerIndex() + processed );
}