Class TCharsetEncoder
java.lang.Object
org.teavm.classlib.java.nio.charset.TCharsetEncoder
- Direct Known Subclasses:
TBufferedEncoder
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
TCharsetEncoder(TCharset cs, float averageBytesPerChar, float maxBytesPerChar)
protected
TCharsetEncoder(TCharset cs, float averageBytesPerChar, float maxBytesPerChar, byte[] replacement)
-
Method Summary
Modifier and TypeMethodDescriptionfloat
boolean
canEncode(char c)
boolean
canEncode(CharSequence sequence)
charset()
encode(TCharBuffer in)
encode(TCharBuffer in, TByteBuffer out, boolean endOfInput)
protected abstract TCoderResult
encodeLoop(TCharBuffer in, TByteBuffer out)
flush(TByteBuffer out)
protected TCoderResult
implFlush(TByteBuffer out)
protected void
implOnMalformedInput(TCodingErrorAction newAction)
protected void
implOnUnmappableCharacter(TCodingErrorAction newAction)
protected void
implReplaceWith(byte[] newReplacement)
protected void
float
onMalformedInput(TCodingErrorAction newAction)
onUnmappableCharacter(TCodingErrorAction newAction)
byte[]
replaceWith(byte[] newReplacement)
reset()
-
Constructor Details
-
TCharsetEncoder
protected TCharsetEncoder(TCharset cs, float averageBytesPerChar, float maxBytesPerChar, byte[] replacement) -
TCharsetEncoder
-
-
Method Details
-
charset
-
replacement
public final byte[] replacement() -
replaceWith
-
implReplaceWith
protected void implReplaceWith(byte[] newReplacement) -
malformedInputAction
-
onMalformedInput
-
implOnMalformedInput
-
unmappableCharacterAction
-
onUnmappableCharacter
-
implOnUnmappableCharacter
-
averageBytesPerChar
public final float averageBytesPerChar() -
maxBytesPerChar
public final float maxBytesPerChar() -
encode
-
encode
- Throws:
TCharacterCodingException
-
encodeLoop
-
canEncode
public boolean canEncode(char c) -
canEncode
-
flush
-
implFlush
-
reset
-
implReset
protected void implReset()
-