com.bluecast.io

Interface CharsetDecoder

public interface CharsetDecoder

Converts bytes to characters.

Version: $Revision: 1.4 $

Author: Yuval Oren

Method Summary
voiddecode(byte[] in_buf, int in_off, int in_len, char[] out_buf, int out_off, int out_len, int[] result)
Decodes an array of bytes into characters.
intmaxBytesPerChar()
Minimum number of characters produced per byte using this decoder.
intminBytesPerChar()
Minimum number of characters produced per byte using this decoder.
CharsetDecodernewCharsetDecoder()
voidreset()

Method Detail

decode

public void decode(byte[] in_buf, int in_off, int in_len, char[] out_buf, int out_off, int out_len, int[] result)
Decodes an array of bytes into characters.

Parameters: in_buf input byte buffer in_off starting byte buffer offset in_len max number of bytes to read out_buf output character buffer out_off char buffer offset at which to start writing out_len max number of chars to write result an array of size >= 2 where results are returned: result[0] = number of bytes read. result[1] = number of chars written

maxBytesPerChar

public int maxBytesPerChar()
Minimum number of characters produced per byte using this decoder.

minBytesPerChar

public int minBytesPerChar()
Minimum number of characters produced per byte using this decoder.

newCharsetDecoder

public CharsetDecoder newCharsetDecoder()

reset

public void reset()