/** * Returns base64 representation of specified byte array. */ public static String encode(byte[] data) { return encode(data, 0, data.length); }
public static void encodeBytes(XMLStreamWriter writer, byte[] bytes) throws XMLStreamException { // TODO: Could be more efficient if we didn't make a String writer.writeCharacters( Base64.encode(bytes) ); }