BaseEncoding { public String encode(byte[] array) { return encode(array, 0, array.length); } @SuppressWarnings("WeakerAccess")  BaseEncoding(Alphabet alphabet, Character paddingChar); String encode(byte[] array); byte[] decode(CharSequence encoded);  }
@Test public void encode() { BaseEncoding baseEncoding = new BaseEncoding(new BaseEncoding.Alphabet("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567".toCharArray()), '='); for (int i = 0; i < 128; i++) { byte[] msg = Bytes.random(i).array(); CharSequence e = baseEncoding.encode(msg); byte[] orig = baseEncoding.decode(e); assertArrayEquals(msg, orig); } }