- java.lang.Object
-
- swim.codec.UtfErrorMode
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voiddebug(Output<?> output)Writes a developer readable, debug-formatted string representation of this object tooutput.static UtfErrorModefatal()Returns aUtfErrorModethat aborts Unicode decoding with an error when invalid code unit sequences are encountered.static UtfErrorModefatalNonZero()Returns aUtfErrorModethat aborts Unicode decoding with an error when invalid code unit sequences, andNULbytes, are encountered.booleanisFatal()Returnstrueif a Unicode decoding should abort with an error when an invalid code unit sequence is encountered.abstract booleanisNonZero()Returnstrueif Unicode decoding should abort with an error when aNULbyte is encountered.abstract UtfErrorModeisNonZero(boolean isNonZero)Returns aUtfErrorModethat, ifisNonZeroistrue, aborts when Unicode decoding encounters aNULbyte.booleanisReplacement()Returnstrueif a Unicode decoding should substitute invalid code unit sequences with a replacement character.static UtfErrorModereplacement()Returns aUtfErrorModethat substitutes invalid code unit sequences with the replacement character (U+FFFD).static UtfErrorModereplacement(int replacementChar)Returns aUtfErrorModethat substitutes invalid code unit sequences with the givenreplacementChar.intreplacementChar()Returns the Unicode code point of the replacement character to substitute for invalid code unit sequences.static UtfErrorModereplacementNonZero()Returns aUtfErrorModethat substitutes invalid code unit sequences with the replacement character (U+FFFD), and aborts decoding with an error whenNULbytes are encountered.static UtfErrorModereplacementNonZero(int replacementChar)Returns aUtfErrorModethat substitutes invalid code unit sequences with the givenreplacementChar, and aborts decoding with an error whenNULbytes are encountered.StringtoString()
-
-
-
Method Detail
-
fatal
public static UtfErrorMode fatal()
Returns aUtfErrorModethat aborts Unicode decoding with an error when invalid code unit sequences are encountered.
-
fatalNonZero
public static UtfErrorMode fatalNonZero()
Returns aUtfErrorModethat aborts Unicode decoding with an error when invalid code unit sequences, andNULbytes, are encountered.
-
replacement
public static UtfErrorMode replacement()
Returns aUtfErrorModethat substitutes invalid code unit sequences with the replacement character (U+FFFD).
-
replacement
public static UtfErrorMode replacement(int replacementChar)
Returns aUtfErrorModethat substitutes invalid code unit sequences with the givenreplacementChar.
-
replacementNonZero
public static UtfErrorMode replacementNonZero()
Returns aUtfErrorModethat substitutes invalid code unit sequences with the replacement character (U+FFFD), and aborts decoding with an error whenNULbytes are encountered.
-
replacementNonZero
public static UtfErrorMode replacementNonZero(int replacementChar)
Returns aUtfErrorModethat substitutes invalid code unit sequences with the givenreplacementChar, and aborts decoding with an error whenNULbytes are encountered.
-
isFatal
public boolean isFatal()
Returnstrueif a Unicode decoding should abort with an error when an invalid code unit sequence is encountered.
-
isReplacement
public boolean isReplacement()
Returnstrueif a Unicode decoding should substitute invalid code unit sequences with a replacement character.
-
replacementChar
public int replacementChar()
Returns the Unicode code point of the replacement character to substitute for invalid code unit sequences. Defaults toU+FFFD.
-
isNonZero
public abstract boolean isNonZero()
Returnstrueif Unicode decoding should abort with an error when aNULbyte is encountered.
-
isNonZero
public abstract UtfErrorMode isNonZero(boolean isNonZero)
Returns aUtfErrorModethat, ifisNonZeroistrue, aborts when Unicode decoding encounters aNULbyte.
-
debug
public abstract void debug(Output<?> output)
Description copied from interface:DebugWrites a developer readable, debug-formatted string representation of this object tooutput.
-
-