question: protected void encryptFinal ( ) throws IOException { inBuffer . flip ( ) ; outBuffer . clear ( ) ; try { cipher . doFinal ( inBuffer , outBuffer ) ; } catch ( ShortBufferException e ) { throw new IOException ( e ) ; } catch ( IllegalBlockSizeException e ) { throw new IOException ( e ) ; } catch ( BadPaddingException e ) { throw new IOException ( e ) ; } inBuffer . clear ( ) ; outBuffer . flip ( ) ; while ( outBuffer . hasRemaining ( ) ) { output . write ( outBuffer ) ; } }
target:  Does final encryption of the last data.