@Test public void testToString() throws Exception { assertEquals("", new Encoded("").toString()); assertEquals("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", new Encoded("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ").toString()); assertEquals(".-_~", new Encoded(".-_~").toString()); assertEquals("%25%2F%22%26%3D%C3%9C%C3%96%C3%84a%C2%B9%C2%B2%C2%B3%C2%BC%C2%BD%C2%AC%40" + "%C3%A6%C5%BF%C3%B0%C4%91%C5%8B%C4%A7%C5%82%C5%82%E2%82%AC%C2%B6%C5" + "%A7%E2%86%90%E2%86%93%E2%86%92%C3%B8%C3%BE%C2%AB%C2%A2%E2%80%9E%E2" + "%80%9C%E2%80%9D%C2%B5%E2%80%A6%C2%B7%C3%A2%C3%B4%C3%AA%C3%A0%C3%A8%C3%B2%C3%B9%C3%A2%20", new Encoded("%/\"&=ÜÖÄa¹²³¼½¬@æſðđŋħłł€¶ŧ←↓→øþ«¢„“”µ…·âôêàèòùâ ").toString()); }
@Override public String toString() { if (mEncoded == null) { try { mEncoded = encoded(mPlain, mCharSet); } catch (UnsupportedEncodingException e) { throw new IllegalArgumentException(String.format("Charset %s not supported by Runtime", mCharSet)); } } return mEncoded.toString(); }
Encoded implements UriEncoded { @Override public String toString() { if (mEncoded == null) { try { mEncoded = encoded(mPlain, mCharSet); } catch (UnsupportedEncodingException e) { throw new IllegalArgumentException(String.format("Charset %s not supported by Runtime", mCharSet)); } } return mEncoded.toString(); } }
Encoded implements UriEncoded { @Override public String toString() { if (mEncoded == null) { try { mEncoded = encoded(mPlain, mCharSet); } catch (UnsupportedEncodingException e) { throw new IllegalArgumentException(String.format("Charset %s not supported by Runtime", mCharSet)); } } return mEncoded.toString(); } Encoded(CharSequence plain);  Encoded(CharSequence plain, String charSet); }
Encoded implements UriEncoded { @Override public String toString() { if (mEncoded == null) { try { mEncoded = encoded(mPlain, mCharSet); } catch (UnsupportedEncodingException e) { throw new IllegalArgumentException(String.format("Charset %s not supported by Runtime", mCharSet)); } } return mEncoded.toString(); } Encoded(CharSequence plain);  Encoded(CharSequence plain, String charSet); @Override UriEncoded normalized(); @Override CharSequence decoded(String charset); @Override CharSequence decoded(); @Override int length(); @Override char charAt(int i); @Override UriEncoded subSequence(int startIndex, int endIndex); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); }
Encoded implements UriEncoded { @Override public String toString() { if (mEncoded == null) { try { mEncoded = encoded(mPlain, mCharSet); } catch (UnsupportedEncodingException e) { throw new IllegalArgumentException(String.format("Charset %s not supported by Runtime", mCharSet)); } } return mEncoded.toString(); } Encoded(CharSequence plain);  Encoded(CharSequence plain, String charSet); @Override UriEncoded normalized(); @Override CharSequence decoded(String charset); @Override CharSequence decoded(); @Override int length(); @Override char charAt(int i); @Override UriEncoded subSequence(int startIndex, int endIndex); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }