if (dataCoding == 0) {
return new DefaultAlphabetEncoding();
} else if (dataCoding == 1) {
return new ASCIIEncoding();
} else if (dataCoding == 3) {
return new Latin1Encoding();
} else if (dataCoding == 8) {
return new UCS2Encoding();
}
throw new IllegalStateException("Data Coding " + configuration.getDataCoding() + " not recognized");