static void verifyB64(String str, String prefix, byte[] result)
    {
        // System.err.println(new String(result, prefix.length(), result.length - prefix.length()));
        byte[] decoded = B64Code.decode(result, prefix.length(), result.length - prefix.length());

        String strd = new String(decoded);

        assertEquals(str, strd);

        char[] cresult = toCharArray(result);
        byte[] decoded2 = B64Code.cdecode(cresult, prefix.length(), cresult.length - prefix.length());
        assertTrue(Arrays.equals(decoded, decoded2));

        char[] cencoded = B64Code.cencode(decoded);
        byte[] encoded = B64Code.encode(decoded);

        assertTrue(cencoded.length == encoded.length);

        verifyArrayContentEqual(cencoded, encoded);
    }
Tests for base 64 encoding.

@author David Yu
@created Sep 27, 2010
protostuff-api/src/test/java/io/protostuff/B64CodeTest.java