java.nio.charset
12 classes of the module java.base.
Load them with:
using {
"java.nio.charset"
}
CharacterCodingException#
class · extends IOException · java.nio.charset.CharacterCodingException
Constructors
new CharacterCodingException() |
Ring: new CharacterCodingException(args) uses the constructor with the fewest parameters (at least one); new CharacterCodingException makes the object with the constructor without parameters; the others: (new CharacterCodingException).@New([ :param = value ]) or .@New([v1,v2]).
The methods and fields of IOException are inherited.
Charset#
abstract · extends Object · java.nio.charset.Charset
Implements: Comparable
Methods
| Method | Ring call | Java overloads |
|---|---|---|
@displayName | @displayName(locale) | String displayName(Locale locale) |
aliases | aliases() | Set aliases() |
availableCharsets | availableCharsets() | static SortedMap availableCharsets() |
canEncode | canEncode() | boolean canEncode() |
compareTo | compareTo(that) | int compareTo(Charset that) |
contains | contains(cs) | boolean contains(Charset cs) |
decode | decode(bb) | CharBuffer decode(ByteBuffer bb) |
defaultCharset | defaultCharset() | static Charset defaultCharset() |
displayName | displayName() | String displayName() |
encode | encode(cb) | ByteBuffer encode(CharBuffer cb)ByteBuffer encode(String str) |
forName | forName(charsetName)forName([charsetName,fallback])forName([ :charsetName = v, :fallback = v ]) | static Charset forName(String charsetName)static Charset forName(String charsetName, Charset fallback) |
isRegistered | isRegistered() | boolean isRegistered() |
isSupported | isSupported(charsetName) | static boolean isSupported(String charsetName) |
name | name() | String name() |
newDecoder | newDecoder() | CharsetDecoder newDecoder() |
newEncoder | newEncoder() | CharsetEncoder newEncoder() |
The methods and fields of Object are inherited.
CharsetDecoder#
abstract · extends Object · java.nio.charset.CharsetDecoder
Methods
| Method | Ring call | Java overloads |
|---|---|---|
averageCharsPerByte | averageCharsPerByte() | float averageCharsPerByte() |
charset | charset() | Charset charset() |
decode | decode(in)decode([in,out,endOfInput])decode([ :in = v, :out = v, :endOfInput = v ]) | CharBuffer decode(ByteBuffer in)CoderResult decode(ByteBuffer in, CharBuffer out, boolean endOfInput) |
detectedCharset | detectedCharset() | Charset detectedCharset() |
flush | flush(out) | CoderResult flush(CharBuffer out) |
isAutoDetecting | isAutoDetecting() | boolean isAutoDetecting() |
isCharsetDetected | isCharsetDetected() | boolean isCharsetDetected() |
malformedInputAction | malformedInputAction() | CodingErrorAction malformedInputAction() |
maxCharsPerByte | maxCharsPerByte() | float maxCharsPerByte() |
onMalformedInput | onMalformedInput(newAction) | CharsetDecoder onMalformedInput(CodingErrorAction newAction) |
onUnmappableCharacter | onUnmappableCharacter(newAction) | CharsetDecoder onUnmappableCharacter(CodingErrorAction newAction) |
replacement | replacement() | String replacement() |
replaceWith | replaceWith(newReplacement) | CharsetDecoder replaceWith(String newReplacement) |
reset | reset() | CharsetDecoder reset() |
unmappableCharacterAction | unmappableCharacterAction() | CodingErrorAction unmappableCharacterAction() |
The methods and fields of Object are inherited.
CharsetEncoder#
abstract · extends Object · java.nio.charset.CharsetEncoder
Methods
| Method | Ring call | Java overloads |
|---|---|---|
averageBytesPerChar | averageBytesPerChar() | float averageBytesPerChar() |
canEncode | canEncode(cs) | boolean canEncode(CharSequence cs)boolean canEncode(char c) |
charset | charset() | Charset charset() |
encode | encode(in)encode([in,out,endOfInput])encode([ :in = v, :out = v, :endOfInput = v ]) | ByteBuffer encode(CharBuffer in)CoderResult encode(CharBuffer in, ByteBuffer out, boolean endOfInput) |
flush | flush(out) | CoderResult flush(ByteBuffer out) |
isLegalReplacement | isLegalReplacement(repl) | boolean isLegalReplacement(byte[] repl) |
malformedInputAction | malformedInputAction() | CodingErrorAction malformedInputAction() |
maxBytesPerChar | maxBytesPerChar() | float maxBytesPerChar() |
onMalformedInput | onMalformedInput(newAction) | CharsetEncoder onMalformedInput(CodingErrorAction newAction) |
onUnmappableCharacter | onUnmappableCharacter(newAction) | CharsetEncoder onUnmappableCharacter(CodingErrorAction newAction) |
replacement | replacement() | byte[] replacement() |
replaceWith | replaceWith(newReplacement) | CharsetEncoder replaceWith(byte[] newReplacement) |
reset | reset() | CharsetEncoder reset() |
unmappableCharacterAction | unmappableCharacterAction() | CodingErrorAction unmappableCharacterAction() |
The methods and fields of Object are inherited.
CoderMalfunctionError#
class · extends Error · java.nio.charset.CoderMalfunctionError
Constructors
new CoderMalfunctionError(Exception cause) |
Ring: new CoderMalfunctionError(args) uses the constructor with the fewest parameters (at least one); new CoderMalfunctionError makes the object with the constructor without parameters; the others: (new CoderMalfunctionError).@New([ :param = value ]) or .@New([v1,v2]).
The methods and fields of Error are inherited.
CoderResult#
class final · extends Object · java.nio.charset.CoderResult
Fields
| Name | Type | Access | In Ring |
|---|---|---|---|
UNDERFLOW | CoderResult | constant · static | o.UNDERFLOW |
OVERFLOW | CoderResult | constant · static | o.OVERFLOW |
Methods
| Method | Ring call | Java overloads |
|---|---|---|
isError | isError() | boolean isError() |
isMalformed | isMalformed() | boolean isMalformed() |
isOverflow | isOverflow() | boolean isOverflow() |
isUnderflow | isUnderflow() | boolean isUnderflow() |
isUnmappable | isUnmappable() | boolean isUnmappable() |
length | length() | int length() |
malformedForLength | malformedForLength(length) | static CoderResult malformedForLength(int length) |
throwException | throwException() | void throwException() |
unmappableForLength | unmappableForLength(length) | static CoderResult unmappableForLength(int length) |
The methods and fields of Object are inherited.
CodingErrorAction#
class final · extends Object · java.nio.charset.CodingErrorAction
Fields
| Name | Type | Access | In Ring |
|---|---|---|---|
IGNORE | CodingErrorAction | constant · static | o.IGNORE |
REPLACE | CodingErrorAction | constant · static | o.REPLACE |
REPORT | CodingErrorAction | constant · static | o.REPORT |
The methods and fields of Object are inherited.
IllegalCharsetNameException#
class · extends IllegalArgumentException · java.nio.charset.IllegalCharsetNameException
Constructors
new IllegalCharsetNameException(String charsetName) |
Ring: new IllegalCharsetNameException(args) uses the constructor with the fewest parameters (at least one); new IllegalCharsetNameException makes the object with the constructor without parameters; the others: (new IllegalCharsetNameException).@New([ :param = value ]) or .@New([v1,v2]).
Methods
| Method | Ring call | Java overloads |
|---|---|---|
getCharsetName | getCharsetName() | String getCharsetName() |
The methods and fields of IllegalArgumentException are inherited.
MalformedInputException#
class · extends CharacterCodingException · java.nio.charset.MalformedInputException
Constructors
new MalformedInputException(int inputLength) |
Ring: new MalformedInputException(args) uses the constructor with the fewest parameters (at least one); new MalformedInputException makes the object with the constructor without parameters; the others: (new MalformedInputException).@New([ :param = value ]) or .@New([v1,v2]).
Methods
| Method | Ring call | Java overloads |
|---|---|---|
getInputLength | getInputLength() | int getInputLength() |
The methods and fields of CharacterCodingException are inherited.
StandardCharsets#
class final · extends Object · java.nio.charset.StandardCharsets
Fields
| Name | Type | Access | In Ring |
|---|---|---|---|
US_ASCII | Charset | constant · static | o.US_ASCII |
ISO_8859_1 | Charset | constant · static | o.ISO_8859_1 |
UTF_8 | Charset | constant · static | o.UTF_8 |
UTF_16BE | Charset | constant · static | o.UTF_16BE |
UTF_16LE | Charset | constant · static | o.UTF_16LE |
UTF_16 | Charset | constant · static | o.UTF_16 |
UTF_32BE | Charset | constant · static | o.UTF_32BE |
UTF_32LE | Charset | constant · static | o.UTF_32LE |
UTF_32 | Charset | constant · static | o.UTF_32 |
The methods and fields of Object are inherited.
UnmappableCharacterException#
class · extends CharacterCodingException · java.nio.charset.UnmappableCharacterException
Constructors
new UnmappableCharacterException(int inputLength) |
Ring: new UnmappableCharacterException(args) uses the constructor with the fewest parameters (at least one); new UnmappableCharacterException makes the object with the constructor without parameters; the others: (new UnmappableCharacterException).@New([ :param = value ]) or .@New([v1,v2]).
Methods
| Method | Ring call | Java overloads |
|---|---|---|
getInputLength | getInputLength() | int getInputLength() |
The methods and fields of CharacterCodingException are inherited.
UnsupportedCharsetException#
class · extends IllegalArgumentException · java.nio.charset.UnsupportedCharsetException
Constructors
new UnsupportedCharsetException(String charsetName) |
Ring: new UnsupportedCharsetException(args) uses the constructor with the fewest parameters (at least one); new UnsupportedCharsetException makes the object with the constructor without parameters; the others: (new UnsupportedCharsetException).@New([ :param = value ]) or .@New([v1,v2]).
Methods
| Method | Ring call | Java overloads |
|---|---|---|
getCharsetName | getCharsetName() | String getCharsetName() |
The methods and fields of IllegalArgumentException are inherited.