Java tutorial
//package com.java2s; public class Main { /** * Converts a hex string to a long value. E.g. "16fee0e525" to 98765432101L. * * Note: this method was copied from the Cloudhopper SMPP Project (https://github.com/twitter/cloudhopper-smpp) * * @param value * @return */ static public long toMessageIdAsLong(String value) throws NumberFormatException { return Long.parseLong(value, 16); } }