Returns a new Output
that accepts UTF-8 code unit sequences, and writes
writes decoded Unicode code points to the composed output
, handling
invalid code unit sequences according to the errorMode
policy.
Returns a new Output
that accepts UTF-8 code unit sequences, and writes
decoded Unicode code points to a growable string
, handling invalid code
unit sequences according to the UtfErrorMode.fatal policy. The
returned Output
accepts an unbounded number of UTF-8 code units,
remaining permanently in the cont state, and binds a
string
containing all decoded code points.
Returns a new Output
that accepts Unicode code points, and writes
encoded UTF-8 code unit sequences to the composed output
, handling
invalid code unit sequences according to the errorMode
policy.
Returns the number of bytes in the UTF-8 encoding of the Unicode code
point c
, handling invalid code unit sequences according to the
errorMode
policy. Returns the size of the
UtfErrorMode.replacementChar for surrogates and invalid code points,
if UtfErrorMode.isReplacement is true
; otherwise returns 0
for
surrogates and invalid code points. Uses the two byte modified UTF-8
encoding of the NUL character (U+0000
), if UtfErrorMode.isNonZero
is true
.
Returns the number of bytes in the UTF-8 encoding of the Unicode code
point c
; returns the size of the Unicode replacement character (U+FFFD
)
for surrogates and invalid code points.
Returns the number of bytes in the UTF-8 encoding the given string
,
handling invalid code unit sequences according to the errorMode
policy.
Returns the number of bytes in the UTF-8 encoding the given string
,
assuming the Unicode replacement character (U+FFFD
) replaces unpaired
surrogates and invalid code points.
UTF-8 Input/Output factory.