private static int _hexval (final char c) throws IOException { final int ret = StringHelper.getHexValue (c); if (ret < 0) throw new IOException ("Illegal hex char '" + c + "'"); return ret; }
private static int _hexval (final char c) throws IOException { final int ret = StringHelper.getHexValue (c); if (ret < 0) throw new IOException ("Illegal hex char '" + c + "'"); return ret; }
/** * @param cHigh * High hex part * @param cLow * Low hex part * @return A value between 0 and 255, or -1 if any input character is not a * hex char! */ public static int getHexByte (@Nonnegative final char cHigh, @Nonnegative final char cLow) { final int nHex1 = getHexValue (cHigh); final int nHex2 = getHexValue (cLow); return nHex1 < 0 || nHex2 < 0 ? -1 : (nHex1 << 4) | nHex2; }
continue; final byte nDecByte = (byte) StringHelper.getHexValue ((char) nEncByte); if (nDecByte == CGlobal.ILLEGAL_UINT) throw new DecoderException ("Failed to convert byte '" +