ByteCodec constructor
ByteCodec({
- int textEncodingByte = 0x00,
textEncodingByte: codec type
- 0x00: ISO_8859_1
- 0x01: UTF16
- 0x02: UTF16BE
- 0x03: UTF8
Implementation
ByteCodec({int textEncodingByte = 0x00}) {
if (textEncodingByte == 0x00) {
_codecType = ByteCodecType.ISO_8859_1;
} else if (textEncodingByte == 0x01) {
_codecType = ByteCodecType.UTF16;
} else if (textEncodingByte == 0x02) {
_codecType = ByteCodecType.UTF16BE;
} else if (textEncodingByte == 0x03) {
_codecType = ByteCodecType.UTF8;
} else {
_codecType = ByteCodecType.Unknown;
}
}