PercentCodec class
A codec that converts byte arrays to and from percent-encoded (also known as URL-encoded) strings according to RFC 3986.
encoder encodes all bytes other than ASCII letters, decimal digits, or one
of -._~
. This matches the behavior of Uri.encodeQueryComponent except
that it doesn't encode 0x20
bytes to the +
character.
To be maximally flexible, decoder will decode any percent-encoded byte and
will allow any non-percent-encoded byte other than %
. By default, it
interprets +
as 0x2B
rather than 0x20
as emitted by
Uri.encodeQueryComponent.
Properties
- decoder → PercentDecoder
-
Returns the decoder of
this
, converting fromT
toS
.no setteroverride - encoder → PercentEncoder
-
Returns the encoder from
S
toT
.no setteroverride - hashCode → int
-
The hash code for this object.
no setterinherited
-
inverted
→ Codec<
String, List< int> > -
Inverts
this
.no setterinherited - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
decode(
String encoded) → List< int> -
Decodes
encoded
data.inherited -
encode(
List< int> input) → String -
Encodes
input
.inherited -
fuse<
R> (Codec< String, R> other) → Codec<List< int> , R> -
Fuses
this
withother
.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited