static public DataCoding createCharacterEncodingGroup ( byte characterEncoding ) throws IllegalArgumentException { // bits 3 thru 0 of the encoding represent 16 languages // make sure the top bits 7 thru 4 are not set if ( ( characterEncoding & 0xF0 ) != 0 ) { throw new IllegalArgumentException ( "Invalid characterEncoding [0x" + HexUtil . toHexString ( characterEncoding ) + "] value used: only 16 possible for char encoding group" ) ; } return new DataCoding ( characterEncoding , Group . CHARACTER_ENCODING , characterEncoding , MESSAGE_CLASS_0 , false ) ; }
Creates a Character Encoding group data coding scheme where 16 different languages are supported . This method validates the range and sets the message class to 0 and compression flags to false .