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

Method encodeBytesToBytes

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

Similar to #encodeBytes(byte[]) but returns a byte array instead of instantiating a String. This is more efficient if you're working with I/O streams and have large data sets to encode. @param source The data to convert @return The Base64-encoded data as a byte[] (of ASCII characters) @thr

( byte[] source )

Source from the content-addressed store, hash-verified

845 * @since 2.3.1
846 */
847 public static byte[] encodeBytesToBytes( byte[] source ) {
848 byte[] encoded = null;
849 try {
850 encoded = encodeBytesToBytes( source, 0, source.length, Base64.NO_OPTIONS );
851 } catch( java.io.IOException ex ) {
852 assert false : "IOExceptions only come from GZipping, which is turned off: " + ex.getMessage();
853 }
854 return encoded;
855 }
856
857
858 /**

Callers 1

encodeBytesMethod · 0.95

Calls 4

encode3to4Method · 0.95
formatMethod · 0.80
writeMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected