Designing Custom Encoders

decodeFromBytes() Method

The decodeFromBytes() method requires conversion if the input data has a different byte format from that used by the parser. If the same format is desired, then the input charset is left undefined, the parsing charset is substituted by default, and the double conversion is bypassed. After parsing, this method requires further conversion if decoding to a string field. The decodeFromBytes() process uses both the input charset and the parsing charset, as illustrated in the following figure.

Figure 29 decodeFromBytes()

Figure described in content.