Two line code fix, but an important couple of lines. :)
The underlying cipher still had buffered data when using Direct ByteBuffers. This changes makes sure that data is read out.
7142509: Cipher.doFinal(ByteBuffer,ByteBuffer) fails to process when in.remaining() == 0 Description: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7142509 Codereview: http://cr.openjdk.java.net/~wetmore/7142509/ Thanks, Brad