![]() |
|
Contents |
Protected Member Functions | |
| void | implReset () |
| Reset this decoder's charset related state. | |
| CoderResult | decodeLoop (ByteBuffer src, CharBuffer dst) |
| Decode bytes into characters. | |
Package Attributes | |
| System.Text.Decoder | coder |
| System.Text.Encoding | enc |
Private Member Functions | |
| Decoder (Charset cs, float avg, float max) | |
| Decoder (Charset cs, System.Text.Encoding enc, int maxCharCount) | |
| CoderResult | decodeBackingArray (ByteBuffer src, CharBuffer dst) |
| void implReset | ( | ) | [protected] |
Reset this decoder's charset related state.
Default implementation does nothing, and this method can be overridden if needed.
Reimplemented from CharsetDecoder.
| CoderResult decodeBackingArray | ( | ByteBuffer | src, | |
| CharBuffer | dst | |||
| ) | [private] |
| CoderResult decodeLoop | ( | ByteBuffer | in, | |
| CharBuffer | out | |||
| ) | [protected, virtual] |
Decode bytes into characters.
This method is called by decode method.
This method will implement the essential decoding operation, and it won't stop decoding until either all the input bytes are read, the output buffer is filled, or some exception encountered. And then it will return a CoderResult object indicating the result of current decoding operation. The rules to construct the CoderResult is same as the decode. When exception encountered in the decoding operation, most implementation of this method will return a relevant result object to decode method, and some performance optimized implementation may handle the exception and implement the error action itself.
The buffers are scanned from their current positions, and their positions will be modified accordingly, while their marks and limits will be intact. At most in.remaining() characters will be read, and out.remaining() bytes will be written.
Note that some implementation may pre-scan the input buffer and return CoderResult.UNDERFLOW until it receives sufficient input.
| in | the input buffer | |
| out | the output buffer |
CoderResult instance indicating the result Implements CharsetDecoder.
System.Text.Decoder coder [package] |
System.Text.Encoding enc [package] |