Here you can find the source of toBase64(byte[] array)
Parameter | Description |
---|---|
array | the byte array to convert |
private static String toBase64(byte[] array)
//package com.java2s; import javax.xml.bind.DatatypeConverter; public class Main { /**//w w w . j ava2 s . com * Converts a byte array into a hexadecimal string. * * @param array the byte array to convert * @return a length*2 character string encoding the byte array */ private static String toBase64(byte[] array) { return DatatypeConverter.printBase64Binary(array); } }