/** This is a wrapper to <code>toCharArray(final byte[] text, final int from, final int len)</code> * @param text * @return an encoded char array from the text */ public final static char[] toCharArray(final byte[] text) { return toCharArray(text, 0, text.length); }
public String execute(byte[] args) { String id = new String(Base64.toCharArray(args)); return id; } };
public String execute(byte[] args) { String id = new String(Base64.toCharArray(args)); // String id = new String(args, SUtil.ASCII); return id; } };
/** * Get the textual representation of a certificate. */ public static String getCertificateText(Certificate cert) { String ret = null; try { StringBuffer buf = new StringBuffer("-----BEGIN CERTIFICATE-----").append(SUtil.LF); buf.append(new String(Base64.toCharArray(cert.getEncoded(), 64))); buf.append(SUtil.LF).append("-----END CERTIFICATE-----"); ret = buf.toString(); } catch(Exception e) { throw new RuntimeException(e); } return ret; }