Java XML Hex hexStringToByteArray(String hex)

Here you can find the source of hexStringToByteArray(String hex)

Description

hex String To Byte Array

License

Open Source License

Declaration

public static byte[] hexStringToByteArray(String hex) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import javax.xml.bind.DatatypeConverter;

public class Main {
    public static byte[] hexStringToByteArray(String hex) {
        return DatatypeConverter.parseHexBinary(hex);
    }// ww w.j a va 2 s. c o m
}

Related

  1. hex2bin(String input)
  2. hexFromBinary(byte[] value)
  3. hexIn(String s)
  4. hexOut(byte[] byteArray)
  5. hexOutSpaces(byte[] byteArray)
  6. hexStringToByteArray(String s)
  7. hexStringToBytes(String text)
  8. hexToBytes(final String s)
  9. hexToString(String str)