public static String encodeToString(byte[] src){
  if (src == null) {
    return null;
  }
  if (src.length == 0) {
    return "";
  }
  String result;
  try {
    result=new String(delegate.encode(src),DEFAULT_CHARSET.displayName());
  }
 catch (  UnsupportedEncodingException e) {
    throw new IllegalStateException(e);
  }
  return result;
}

public static String encodeToString ( byte [ ] src ) { if ( src == null ) { return null ; } if ( src . length == 0 ) { return "" ; } String result ; try { result = new String ( delegate . encode ( src ) , DEFAULT_CHARSET . displayName ( ) ) ; } catch ( UnsupportedEncodingException e ) { throw new IllegalStateException ( e ) ; } return result ; }
base64 - encode the given byte array to a string .
