Package com.jogamp.common.net
Class Uri.Encoded
java.lang.Object
com.jogamp.common.net.Uri.Encoded
- All Implemented Interfaces:
CharSequence,Comparable<Uri.Encoded>
- Direct Known Subclasses:
Uri.ASCIIEncoded
- Enclosing class:
- Uri
Immutable RFC3986 encoded string.
-
Constructor Summary
ConstructorsConstructorDescriptionEncodes all characters into their hexadecimal value prepended by '%', except: letters ('a'..'z', 'A'..'Z') numbers ('0'..'9') characters in the legal-set parameter others (unicode characters that are not in US-ASCII set, and are not ISO Control or are not ISO Space characters) -
Method Summary
Modifier and TypeMethodDescriptionstatic Uri.EncodedCasts the given encoded String by creating a new Encoded instance.final charcharAt(int index) final intconcat(Uri.Encoded encoded) final Stringdecode()Decodes the string argument which is assumed to be encoded in thex-www-form-urlencodedMIME content type using the UTF-8 encoding scheme.booleanfinal booleanfinal booleanequalsIgnoreCase(Uri.Encoded anotherEncoded) final Stringget()Returns the encoded Stringfinal inthashCode()final intindexOf(int ch) SeeString.indexOf(int).final intindexOf(int ch, int fromIndex) final intfinal intbooleanisASCII()final intlastIndexOf(int ch) intlastIndexOf(int ch, int fromIndex) intlastIndexOf(String str) intlastIndexOf(String str, int fromIndex) final intlength()booleanstartsWith(String prefix) booleanstartsWith(String prefix, int toffset) final CharSequencesubSequence(int start, int end) final Uri.Encodedsubstring(int start) final Uri.Encodedsubstring(int start, int end) final StringtoString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.CharSequence
chars, codePoints, isEmpty
-
Constructor Details
-
Encoded
Encodes all characters into their hexadecimal value prepended by '%', except:- letters ('a'..'z', 'A'..'Z')
- numbers ('0'..'9')
- characters in the legal-set parameter
- others (unicode characters that are not in US-ASCII set, and are not ISO Control or are not ISO Space characters)
Uses
Uri.encode(String, String)for implementation..- Parameters:
vanilla- the string to be encodedlegal- extended character set, allowed to be preserved in the vanilla string
-
-
Method Details
-
cast
Casts the given encoded String by creating a new Encoded instance.No encoding will be performed, use with care.
-
isASCII
public boolean isASCII() -
get
Returns the encoded String -
decode
Decodes the string argument which is assumed to be encoded in thex-www-form-urlencodedMIME content type using the UTF-8 encoding scheme.'%' and two following hex digit characters are converted to the equivalent byte value. All other characters are passed through unmodified.
e.g. "A%20B%20C %24%25" -> "A B C $%"
Uses
Uri.decode(String)for implementation.. -
toString
Returns the encoded String, same as
get().- Specified by:
toStringin interfaceCharSequence- Overrides:
toStringin classObject
-
hashCode
public final int hashCode() -
equals
- Overrides:
equalsin classObject- Parameters:
o- The comparison argument, either aUri.Encodedor aString- Returns:
trueif the given object is equivalent to this instance, otherwisefalse.- See Also:
-
length
public final int length()- Specified by:
lengthin interfaceCharSequence
-
charAt
public final char charAt(int index) - Specified by:
charAtin interfaceCharSequence
-
subSequence
- Specified by:
subSequencein interfaceCharSequence
-
compareTo
- Specified by:
compareToin interfaceComparable<Uri.Encoded>
-
concat
-
substring
-
substring
-
indexOf
public final int indexOf(int ch) SeeString.indexOf(int). -
indexOf
public final int indexOf(int ch, int fromIndex) -
indexOf
-
indexOf
-
lastIndexOf
public final int lastIndexOf(int ch) -
lastIndexOf
public int lastIndexOf(int ch, int fromIndex) -
lastIndexOf
-
lastIndexOf
-
startsWith
-
startsWith
-
endsWith
-
equalsIgnoreCase
-