Here you can find the source of getBytes(String hex)
public static byte[] getBytes(String hex)
//package com.java2s; /*/*from w w w . j av a 2 s . c o m*/ | Author: http://github.com/itsGhost | @_GGhost | Type: Work in progress | License: | Copyright (C) itsghost.me - All Rights Reserved | Unauthorized copying of this file, via any medium is strictly prohibited | Proprietary, private and confidential */ import javax.xml.bind.DatatypeConverter; public class Main { public static byte[] getBytes(String hex) { return DatatypeConverter.parseHexBinary(hex); } }