Java Code Examples for com.sun.org.apache.xerces.internal.impl.dv.util.HexBin#decode()

The following examples show how to use com.sun.org.apache.xerces.internal.impl.dv.util.HexBin#decode() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: GenerateKeyImpl.java    From julongchain with Apache License 2.0 6 votes vote down vote up
public static byte[] readfile(String path) throws Exception{
    try {
        File file = new File(path);
        InputStream inputStream = new FileInputStream(file);//文件内容的字节流
        InputStreamReader inputStreamReader= new InputStreamReader(inputStream); //得到文件的字符流
        BufferedReader bufferedReader=new BufferedReader(inputStreamReader); //放入读取缓冲区
        String readd="";
        StringBuffer stringBuffer=new StringBuffer();
        while ((readd=bufferedReader.readLine())!=null) {
            stringBuffer.append(readd);
        }
        inputStream.close();
        String keystr=stringBuffer.toString();
        System.out.println(keystr+" -----> key读取成功");  //读取出来的key是编码之后的 要进行转码
        byte[] keybyte= HexBin.decode(keystr);
        return keybyte;
    } catch (Exception e) {
        // TODO: handle exception
        e.printStackTrace();
        throw e;
    }       
}
 
Example 2
Source File: HexBinaryDV.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException {
    byte[] decoded = HexBin.decode(content);
    if (decoded == null)
        throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{content, "hexBinary"});

    return new XHex(decoded);
}
 
Example 3
Source File: HexBinaryDV.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException {
    byte[] decoded = HexBin.decode(content);
    if (decoded == null)
        throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{content, "hexBinary"});

    return new XHex(decoded);
}
 
Example 4
Source File: HexBinaryDV.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException {
    byte[] decoded = HexBin.decode(content);
    if (decoded == null)
        throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{content, "hexBinary"});

    return new XHex(decoded);
}
 
Example 5
Source File: HexBinaryDV.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException {
    byte[] decoded = HexBin.decode(content);
    if (decoded == null)
        throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{content, "hexBinary"});

    return new XHex(decoded);
}
 
Example 6
Source File: HexBinaryDV.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException {
    byte[] decoded = HexBin.decode(content);
    if (decoded == null)
        throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{content, "hexBinary"});

    return new XHex(decoded);
}
 
Example 7
Source File: HexBinaryDV.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException {
    byte[] decoded = HexBin.decode(content);
    if (decoded == null)
        throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{content, "hexBinary"});

    return new XHex(decoded);
}
 
Example 8
Source File: HexBinaryDV.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException {
    byte[] decoded = HexBin.decode(content);
    if (decoded == null)
        throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{content, "hexBinary"});

    return new XHex(decoded);
}
 
Example 9
Source File: HexBinaryDV.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException {
    byte[] decoded = HexBin.decode(content);
    if (decoded == null)
        throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{content, "hexBinary"});

    return new XHex(decoded);
}
 
Example 10
Source File: HexBinaryDV.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException {
    byte[] decoded = HexBin.decode(content);
    if (decoded == null)
        throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{content, "hexBinary"});

    return new XHex(decoded);
}
 
Example 11
Source File: HexBinaryDV.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException {
    byte[] decoded = HexBin.decode(content);
    if (decoded == null)
        throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{content, "hexBinary"});

    return new XHex(decoded);
}
 
Example 12
Source File: HexBinaryDV.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException {
    byte[] decoded = HexBin.decode(content);
    if (decoded == null)
        throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{content, "hexBinary"});

    return new XHex(decoded);
}