class ObjHexStringConverter {

  public static Object hex2obj(String hexString) throws DecoderException, IOException, ClassNotFoundException {
    byte[] bytes = Hex.decodeHex(hexString.toCharArray());
    ByteArrayInputStream bytesIn = new ByteArrayInputStream(bytes);
    ObjectInputStream objIn = new ObjectInputStream(bytesIn);
    Object obj = objIn.readObject();
    bytesIn.close();
    objIn.close();
    return obj;
  }

}