MCPcopy Create free account
hub / github.com/baumgarr/nixnote2 / encode

Method encode

java/src/cx/fbn/encrypt/Base64.java:547–557  ·  view source on GitHub ↗

Performs Base64 encoding on the raw ByteBuffer, writing it to the encoded ByteBuffer. This is an experimental feature. Currently it does not pass along any options (such as #DO_BREAK_LINES or #GZIP. @param raw input buffer @param encoded output buffer @sinc

( java.nio.ByteBuffer raw, java.nio.ByteBuffer encoded )

Source from the content-addressed store, hash-verified

545 * @since 2.3
546 */
547 public static void encode( java.nio.ByteBuffer raw, java.nio.ByteBuffer encoded ){
548 byte[] raw3 = new byte[3];
549 byte[] enc4 = new byte[4];
550
551 while( raw.hasRemaining() ){
552 int rem = Math.min(3,raw.remaining());
553 raw.get(raw3,0,rem);
554 Base64.encode3to4(enc4, raw3, rem, Base64.NO_OPTIONS );
555 encoded.put(enc4);
556 } // end input remaining
557 }
558
559
560 /**

Callers

nothing calls this directly

Calls 2

encode3to4Method · 0.95
getMethod · 0.45

Tested by

no test coverage detected