nl_tokens: Performs Base64 encoding on the <code > raw< / code > ByteBuffer writing it to the <code > encoded< / code > CharBuffer . This is an experimental feature . Currently it does not pass along any options ( such as { @link #DO_BREAK_LINES } or { @link #GZIP } .
pl_tokens: public static void encode ( final java . nio . ByteBuffer raw , final java . nio . CharBuffer encoded ) { final byte [ ] raw3 = new byte [ 3 ] ; final byte [ ] enc4 = new byte [ 4 ] ; while ( raw . hasRemaining ( ) ) { final int rem = Math . <mask> ( 3 , raw . remaining ( ) ) ; raw . get ( raw3 , 0 , rem ) ; Base64 . encode3to4 ( enc4 , raw3 , rem , Base64 . NO_OPTIONS ) ; for ( int i = 0 ; i < 4 ; i ++ ) { encoded . put ( ( char ) ( enc4 [ i ] & 0xFF ) ) ; } } // end input remaining
   }