public HexBinary(String in) throws XPathException { in = StringValue.trimWhitespace(in); if ((in.length() & 1) != 0) { throw new XPathException("FORG0001: A hexBinary value must contain an even " + "number of characters"); } data = new byte[in.length() / 2]; for (int i = 0; i < data.length; i++) { data[i] = (byte)((fromHex(in.charAt(2*i))<<4) + (fromHex(in.charAt(2*i+1)))); }
public HexBinary(byte[] data) { super(data);
    public HexBinary(String in) throws XPathException {        in = StringValue.trimWhitespace(in);        if ((in.length() & 1) != 0) {            throw new XPathException("FORG0001: A hexBinary value must contain an even " +                    "number of characters");        }        data = new byte[in.length() / 2];        for (int i = 0; i < data.length; i++) {            data[i] = (byte)((fromHex(in.charAt(2*i))<<4) +                    (fromHex(in.charAt(2*i+1))));        }    }