public void addMapping ( byte [ ] src , String dest ) throws IOException { if ( src . length == 1 ) { singleByteMappings . put ( Integer . valueOf ( src [ 0 ] & 0xff ) , dest ) ; } else if ( src . length == 2 ) { int intSrc = src [ 0 ] & 0xFF ; intSrc <<= 8 ; intSrc |= ( src [ 1 ] & 0xFF ) ; doubleByteMappings . put ( Integer . valueOf ( intSrc ) , dest ) ; } else { throw new IOException ( "Mapping code should be 1 or two bytes and not " + src . length ) ; } }
This will add a mapping .