public static char decodeChar(byte[] src, int srcOffset)
        throws CorruptEncodingException
    {
        try {
            return (char)((src[srcOffset] << 8) | (src[srcOffset + 1] & 0xff));
        } catch (IndexOutOfBoundsException e) {
            throw new CorruptEncodingException(null, e);
        }
    }
public static char decodeChar ( byte [ ] src , int srcOffset ) throws CorruptEncodingException { try { return ( char ) ( ( src [ srcOffset ] << 8 ) | ( src [ srcOffset + 1 ] & 0xff ) ) ; } catch ( IndexOutOfBoundsException e ) { throw new CorruptEncodingException ( null , e ) ; } }
Decodes a char from exactly 2 bytes.

@param src source of encoded bytes
@param srcOffset offset into source array
@return char value