Java tutorial
//package com.java2s; /* * oxPush2 is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text. * * Copyright (c) 2014, Gluu */ import org.apache.commons.codec.DecoderException; import org.apache.commons.codec.binary.Hex; public class Main { public static byte[] decodeHexString(String arg) throws DecoderException { return Hex.decodeHex(arg.toCharArray()); } }