Java in a Nutshell, 5th Edition [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Java in a Nutshell, 5th Edition [Electronic resources] - نسخه متنی

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید


CharsetEncoderjava.nio.charset

Java 1.4

A CharsetEncoder is an
"encoding engine" that converts a
sequence of characters into a sequence of bytes using some character
encoding. Obtain a CharsetEncoder with the
newEncoder( ) method of the
Charset that represents the desired encoding.

A CharsetEncoder works like a
CharsetDecoder in reverse. Use the
encode( )
method to encode characters read from a CharBuffer
into bytes stored in a ByteBuffer. Please see
CharsetDecoder, which is documented in detail.

public abstract class

CharsetEncoder {
// Protected Constructors
protected

CharsetEncoder (Charset

cs ,
float

averageBytesPerChar , float

maxBytesPerChar );
protected

CharsetEncoder (Charset

cs ,
float

averageBytesPerChar , float

maxBytesPerChar , byte[ ]

replacement );
// Public Instance Methods
public final float

averageBytesPerChar ( );
public boolean

canEncode (CharSequence

cs );
public boolean

canEncode (char

c );
public final Charset

charset ( );
public final java.nio.ByteBuffer

encode (java.nio.CharBuffer

in )
throws CharacterCodingException;
public final CoderResult

encode (java.nio.CharBuffer

in ,
java.nio.ByteBuffer

out , boolean

endOfInput );
public final CoderResult

flush (java.nio.ByteBuffer

out );
public boolean

isLegalReplacement (byte[ ]

repl );
public CodingErrorAction

malformedInputAction ( );
public final float

maxBytesPerChar ( );
public final CharsetEncoder

onMalformedInput (CodingErrorAction

newAction );
public final CharsetEncoder

onUnmappableCharacter (CodingErrorAction

newAction );
public final byte[ ]

replacement ( );
public final CharsetEncoder

replaceWith (byte[ ]

newReplacement );
public final CharsetEncoder

reset ( );
public CodingErrorAction

unmappableCharacterAction ( );
// Protected Instance Methods
protected abstract CoderResult

encodeLoop (java.nio.CharBuffer

in ,
java.nio.ByteBuffer

out );
protected CoderResult

implFlush (java.nio.ByteBuffer

out );
protected void

implOnMalformedInput (CodingErrorAction

newAction ); empty
protected void

implOnUnmappableCharacter (CodingErrorAction

newAction ); empty
protected void

implReplaceWith (byte[ ]

newReplacement ); empty
protected void

implReset ( ); empty
}


Passed To


java.io.OutputStreamWriter.OutputStreamWriter( ),
java.nio.channels.Channels.newWriter( )

Returned By


Charset.newEncoder( )


    / 1191