protected void decrypt() throws IOException {
  inBuffer.flip();
  outBuffer.clear();
  try {
    cipher.update(inBuffer,outBuffer);
  }
 catch (  ShortBufferException e) {
    throw new IOException(e);
  }
  inBuffer.clear();
  outBuffer.flip();
}

protected void decrypt ( ) throws IOException { inBuffer . flip ( ) ; outBuffer . clear ( ) ; try { cipher . update ( inBuffer , outBuffer ) ; } catch ( ShortBufferException e ) { throw new IOException ( e ) ; } inBuffer . clear ( ) ; outBuffer . flip ( ) ; }
does the decryption using inbuffer as input and outbuffer as output . upon return , inbuffer is cleared ; the decrypted data starts at outbuffer . position ( ) and ends at outbuffer . limit ( ) .
