@Test public void testTriplets() { assertEquals("AAAA", new String(Base64.encodeBase64(new byte[]{(byte) 0, (byte) 0, (byte) 0}))); assertEquals("AAAB", new String(Base64.encodeBase64(new byte[]{(byte) 0, (byte) 0, (byte) 1}))); assertEquals("AAAC", new String(Base64.encodeBase64(new byte[]{(byte) 0, (byte) 0, (byte) 2}))); assertEquals("AAAD", new String(Base64.encodeBase64(new byte[]{(byte) 0, (byte) 0, (byte) 3}))); assertEquals("AAAE", new String(Base64.encodeBase64(new byte[]{(byte) 0, (byte) 0, (byte) 4}))); assertEquals("AAAF", new String(Base64.encodeBase64(new byte[]{(byte) 0, (byte) 0, (byte) 5}))); assertEquals("AAAG", new String(Base64.encodeBase64(new byte[]{(byte) 0, (byte) 0, (byte) 6}))); assertEquals("AAAH", new String(Base64.encodeBase64(new byte[]{(byte) 0, (byte) 0, (byte) 7}))); assertEquals("AAAI", new String(Base64.encodeBase64(new byte[]{(byte) 0, (byte) 0, (byte) 8}))); assertEquals("AAAJ", new String(Base64.encodeBase64(new byte[]{(byte) 0, (byte) 0, (byte) 9}))); assertEquals("AAAK", new String(Base64.encodeBase64(new byte[]{(byte) 0, (byte) 0, (byte) 10}))); assertEquals("AAAL", new String(Base64.encodeBase64(new byte[]{(byte) 0, (byte) 0, (byte) 11}))); assertEquals("AAAM", new String(Base64.encodeBase64(new byte[]{(byte) 0, (byte) 0, (byte) 12}))); assertEquals("AAAN", new String(Base64.encodeBase64(new byte[]{(byte) 0, (byte) 0, (byte) 13}))); assertEquals("AAAO", new String(Base64.encodeBase64(new byte[]{(byte) 0, (byte) 0, (byte) 14}))); assertEquals("AAAP", new String(Base64.encodeBase64(new byte[]{(byte) 0, (byte) 0, (byte) 15}))); assertEquals("AAAQ", new String(Base64.encodeBase64(new byte[]{(byte) 0, (byte) 0, (byte) 16}))); assertEquals("AAAR", new String(Base64.encodeBase64(new byte[]{(byte) 0, (byte) 0, (byte) 17}))); assertEquals("AAAS", new String(Base64.encodeBase64(new byte[]{(byte) 0, (byte) 0, (byte) 18}))); assertEquals("AAAT", new String(Base64.encodeBase64(new byte[]{(byte) 0, (byte) 0, (byte) 19}))); assertEquals("AAAU", new String(Base64.encodeBase64(new byte[]{(byte) 0, (byte) 0, (byte) 20}))); assertEquals("AAAV", new String(Base64.encodeBase64(new byte[]{(byte) 0, (byte) 0, (byte) 21}))); assertEquals("AAAW", new String(Base64.encodeBase64(new byte[]{(byte) 0, (byte) 0, (byte) 22}))); assertEquals("AAAX", new String(Base64.encodeBase64(new byte[]{(byte) 0, (byte) 0, (byte) 23}))); assertEquals("AAAY", new String(Base64.encodeBase64(new byte[]{(byte) 0, (byte) 0, (byte) 24}))); assertEquals("AAAZ", new String(Base64.encodeBase64(new byte[]{(byte) 0, (byte) 0, (byte) 25}))); assertEquals("AAAa", new String(Base64.encodeBase64(new byte[]{(byte) 0, (byte) 0, (byte) 26}))); assertEquals("AAAb", new String(Base64.encodeBase64(new byte[]{(byte) 0, (byte) 0, (byte) 27}))); assertEquals("AAAc", new String(Base64.encodeBase64(new byte[]{(byte) 0, (byte) 0, (byte) 28}))); assertEquals("AAAd", new String(Base64.encodeBase64(new byte[]{(byte) 0, (byte) 0, (byte) 29}))); assertEquals("AAAe", new String(Base64.encodeBase64(new byte[]{(byte) 0, (byte) 0, (byte) 30}))); assertEquals("AAAf", new String(Base64.encodeBase64(new byte[]{(byte) 0, (byte) 0, (byte) 31}))); assertEquals("AAAg", new String(Base64.encodeBase64(new byte[]{(byte) 0, (byte) 0, (byte) 32}))); assertEquals("AAAh", new String(Base64.encodeBase64(new byte[]{(byte) 0, (byte) 0, (byte) 33}))); assertEquals("AAAi", new String(Base64.encodeBase64(new byte[]{(byte) 0, (byte) 0, (byte) 34}))); assertEquals("AAAj", new String(Base64.encodeBase64(new byte[]{(byte) 0, (byte) 0, (byte) 35}))); assertEquals("AAAk", new String(Base64.encodeBase64(new byte[]{(byte) 0, (byte) 0, (byte) 36}))); assertEquals("AAAl", new String(Base64.encodeBase64(new byte[]{(byte) 0, (byte) 0, (byte) 37}))); assertEquals("AAAm", new String(Base64.encodeBase64(new byte[]{(byte) 0, (byte) 0, (byte) 38}))); assertEquals("AAAn", new String(Base64.encodeBase64(new byte[]{(byte) 0, (byte) 0, (byte) 39}))); assertEquals("AAAo", new String(Base64.encodeBase64(new byte[]{(byte) 0, (byte) 0, (byte) 40}))); assertEquals("AAAp", new String(Base64.encodeBase64(new byte[]{(byte) 0, (byte) 0, (byte) 41}))); assertEquals("AAAq", new String(Base64.encodeBase64(new byte[]{(byte) 0, (byte) 0, (byte) 42}))); assertEquals("AAAr", new String(Base64.encodeBase64(new byte[]{(byte) 0, (byte) 0, (byte) 43}))); assertEquals("AAAs", new String(Base64.encodeBase64(new byte[]{(byte) 0, (byte) 0, (byte) 44}))); assertEquals("AAAt", new String(Base64.encodeBase64(new byte[]{(byte) 0, (byte) 0, (byte) 45}))); assertEquals("AAAu", new String(Base64.encodeBase64(new byte[]{(byte) 0, (byte) 0, (byte) 46}))); assertEquals("AAAv", new String(Base64.encodeBase64(new byte[]{(byte) 0, (byte) 0, (byte) 47}))); assertEquals("AAAw", new String(Base64.encodeBase64(new byte[]{(byte) 0, (byte) 0, (byte) 48}))); assertEquals("AAAx", new String(Base64.encodeBase64(new byte[]{(byte) 0, (byte) 0, (byte) 49}))); assertEquals("AAAy", new String(Base64.encodeBase64(new byte[]{(byte) 0, (byte) 0, (byte) 50}))); assertEquals("AAAz", new String(Base64.encodeBase64(new byte[]{(byte) 0, (byte) 0, (byte) 51}))); assertEquals("AAA0", new String(Base64.encodeBase64(new byte[]{(byte) 0, (byte) 0, (byte) 52}))); assertEquals("AAA1", new String(Base64.encodeBase64(new byte[]{(byte) 0, (byte) 0, (byte) 53}))); assertEquals("AAA2", new String(Base64.encodeBase64(new byte[]{(byte) 0, (byte) 0, (byte) 54}))); assertEquals("AAA3", new String(Base64.encodeBase64(new byte[]{(byte) 0, (byte) 0, (byte) 55}))); assertEquals("AAA4", new String(Base64.encodeBase64(new byte[]{(byte) 0, (byte) 0, (byte) 56}))); assertEquals("AAA5", new String(Base64.encodeBase64(new byte[]{(byte) 0, (byte) 0, (byte) 57}))); assertEquals("AAA6", new String(Base64.encodeBase64(new byte[]{(byte) 0, (byte) 0, (byte) 58}))); assertEquals("AAA7", new String(Base64.encodeBase64(new byte[]{(byte) 0, (byte) 0, (byte) 59}))); assertEquals("AAA8", new String(Base64.encodeBase64(new byte[]{(byte) 0, (byte) 0, (byte) 60}))); assertEquals("AAA9", new String(Base64.encodeBase64(new byte[]{(byte) 0, (byte) 0, (byte) 61}))); assertEquals("AAA+", new String(Base64.encodeBase64(new byte[]{(byte) 0, (byte) 0, (byte) 62}))); assertEquals("AAA/", new String(Base64.encodeBase64(new byte[]{(byte) 0, (byte) 0, (byte) 63}))); }
public static byte[] encodeBase64(final byte[] binaryData) { return encodeBase64(binaryData, false); }
Base64 extends BaseNCodec { public static byte[] encodeBase64(final byte[] binaryData) { return encodeBase64(binaryData, false); } }
Base64 extends BaseNCodec { public static byte[] encodeBase64(final byte[] binaryData) { return encodeBase64(binaryData, false); } Base64();  Base64(final boolean urlSafe);  Base64(final int lineLength);  Base64(final int lineLength, final byte[] lineSeparator);  Base64(final int lineLength, final byte[] lineSeparator, final boolean urlSafe); }
Base64 extends BaseNCodec { public static byte[] encodeBase64(final byte[] binaryData) { return encodeBase64(binaryData, false); } Base64();  Base64(final boolean urlSafe);  Base64(final int lineLength);  Base64(final int lineLength, final byte[] lineSeparator);  Base64(final int lineLength, final byte[] lineSeparator, final boolean urlSafe); boolean isUrlSafe(); @Deprecated static boolean isArrayByteBase64(final byte[] arrayOctet); static boolean isBase64(final byte octet); static boolean isBase64(final String base64); static boolean isBase64(final byte[] arrayOctet); static byte[] encodeBase64(final byte[] binaryData); static String encodeBase64String(final byte[] binaryData); static byte[] encodeBase64URLSafe(final byte[] binaryData); static String encodeBase64URLSafeString(final byte[] binaryData); static byte[] encodeBase64Chunked(final byte[] binaryData); static byte[] encodeBase64(final byte[] binaryData, final boolean isChunked); static byte[] encodeBase64(final byte[] binaryData, final boolean isChunked, final boolean urlSafe); static byte[] encodeBase64(final byte[] binaryData, final boolean isChunked,
                                      final boolean urlSafe, final int maxResultSize); static byte[] decodeBase64(final String base64String); static byte[] decodeBase64(final byte[] base64Data); static BigInteger decodeInteger(final byte[] pArray); static byte[] encodeInteger(final BigInteger bigInt); }
Base64 extends BaseNCodec { public static byte[] encodeBase64(final byte[] binaryData) { return encodeBase64(binaryData, false); } Base64();  Base64(final boolean urlSafe);  Base64(final int lineLength);  Base64(final int lineLength, final byte[] lineSeparator);  Base64(final int lineLength, final byte[] lineSeparator, final boolean urlSafe); boolean isUrlSafe(); @Deprecated static boolean isArrayByteBase64(final byte[] arrayOctet); static boolean isBase64(final byte octet); static boolean isBase64(final String base64); static boolean isBase64(final byte[] arrayOctet); static byte[] encodeBase64(final byte[] binaryData); static String encodeBase64String(final byte[] binaryData); static byte[] encodeBase64URLSafe(final byte[] binaryData); static String encodeBase64URLSafeString(final byte[] binaryData); static byte[] encodeBase64Chunked(final byte[] binaryData); static byte[] encodeBase64(final byte[] binaryData, final boolean isChunked); static byte[] encodeBase64(final byte[] binaryData, final boolean isChunked, final boolean urlSafe); static byte[] encodeBase64(final byte[] binaryData, final boolean isChunked,
                                      final boolean urlSafe, final int maxResultSize); static byte[] decodeBase64(final String base64String); static byte[] decodeBase64(final byte[] base64Data); static BigInteger decodeInteger(final byte[] pArray); static byte[] encodeInteger(final BigInteger bigInt);  }