Android Utililty Methods Charset Encode

List of utility methods to do Charset Encode

Description

The list of methods to do Charset Encode are organized into topic(s).

Method

ByteBufferencode(CharBuffer in, CharsetEncoder encoder)
encode
int length = (int) (in.remaining() * (double) encoder
        .averageBytesPerChar());
ByteBuffer out = ByteBuffer.allocate(length);
encoder.reset();
CoderResult flushResult = null;
while (flushResult != CoderResult.UNDERFLOW) {
    CoderResult encodeResult = encoder.encode(in, out, true);
    if (encodeResult == CoderResult.OVERFLOW) {
...