Base32 { public static String encode(byte[] data) { InputValidation.begin().when(data == null, "data is null").validate(); return new String(encode(null, data), ASCII); } private  Base32(); static int encodedLength(int dataLength); static int decodedLength(int dataLength); static String encode(byte[] data); static byte[] encode(byte[] dest, byte[] data); static ByteIterator encode(ByteIterator data); static byte[] decode(String data); static byte[] decode(byte[] dest, byte[] data); static ByteIterator decode(ByteIterator data); static final Pattern DIGIT; static final Pattern ENCODED; }
@Test public void testEncode() throws Exception { byte[] enc = Base32.encode(null, "Hello World".getBytes(ASCII)); System.out.println(new String(enc, ASCII)); byte[] dec = Base32.decode(null, enc); System.out.println(new String(dec, ASCII)); }