public static String encode(byte[] id) { char[] cd = encodeChunk(id, 0, id.length); return new String(cd, 0, cd.length); }
public static void encodeChunk(byte[] id, int o, int l, OutputStream ostream) throws Base64Exception { try { ostream.write(new String(encodeChunk(id, o, l)).getBytes()); } catch (IOException e) { throw new Base64Exception(new Message("BASE64_ENCODE_IOEXCEPTION", LOG), e); } }
public static void encode(byte[] id, int o, int l, Writer writer) throws Base64Exception { try { writer.write(encodeChunk(id, o, l)); } catch (IOException e) { throw new Base64Exception(new Message("BASE64_ENCODE_WRITER_IOEXCEPTION", LOG), e); } }