public static int decodeSingle ( final byte [ ] input , final int inoff ) { if ( input == null ) { throw new NullPointerException ( "input" ) ; } if ( input . length < 2 ) { // not required by (inoff >= input.length -1) checked below throw new IllegalArgumentException ( "input.length(" + input . length + ") < 2" ) ; } if ( inoff < 0 ) { throw new IllegalArgumentException ( "inoff(" + inoff + ") < 0" ) ; } if ( inoff >= input . length - 1 ) { throw new IllegalArgumentException ( "inoff(" + inoff + ") >= input.length(" + input . length + ") - 1" ) ; } return ( decodeHalf ( input [ inoff ] & 0xFF ) << 4 ) | decodeHalf ( input [ inoff + 1 ] & 0xFF ) ; }
Decodes two nibbles in given input array and returns the decoded octet .