public static String toBase64 ( byte [ ] byteArray ) { String result = null ; if ( byteArray != null ) { result = Base64 . encodeBase64String ( byteArray ) ; } return result ; }
Encodes the given byte array as a base - 64 String .