@Test public void badEncoding() { boolean exception = false; try { UrlBase64.encode("", "UNKNOWN"); } catch (RuntimeException e) { exception = true; } Assert.assertTrue(exception); exception = false; try { UrlBase64.encode(new byte[0], "UNKNOWN"); } catch (RuntimeException e) { exception = true; } Assert.assertTrue(exception); }
public static String encode(String data) { return encode(data, "UTF-8"); }
UrlBase64 { public static String encode(String data) { return encode(data, "UTF-8"); } }
UrlBase64 { public static String encode(String data) { return encode(data, "UTF-8"); }  }
UrlBase64 { public static String encode(String data) { return encode(data, "UTF-8"); }  static String encode(String data); static String encode(String data, String encoding); static String encode(byte[] data); static String encode(byte[] data, String encoding); static byte[] decode(String encoded); static byte[] decode(String encoded, String encoding); static String decodeToString(String encoded); static String decodeToString(String encoded, String encoding); static String stripPadding(String encoded); static String addPadding(String encoded); }
UrlBase64 { public static String encode(String data) { return encode(data, "UTF-8"); }  static String encode(String data); static String encode(String data, String encoding); static String encode(byte[] data); static String encode(byte[] data, String encoding); static byte[] decode(String encoded); static byte[] decode(String encoded, String encoding); static String decodeToString(String encoded); static String decodeToString(String encoded, String encoding); static String stripPadding(String encoded); static String addPadding(String encoded);  }