wro4j-core/src/main/java/ro/isdc/wro/util/Base64.java
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.min(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
  }
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.min(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
  }
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}.

@param raw input buffer
@param encoded output buffer
@since 2.3