Here you can find the source of toHexString(long l)
J2ME/J9 compatibility instead of Long.toHexString Copied from bluecove: http://www.bluecove.org/bluecove/apidocs/com/intel/bluetooth/Utils.html
public static String toHexString(long l)
//package com.java2s; /*/*w w w . java 2 s .c om*/ * Copyright (C) 2008 onwards University of Deusto * * All rights reserved. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. * * This software consists of contributions made by many individuals, * listed below: * * Author: Aitor G?mez Goiri <aitor.gomez@deusto.es> */ public class Main { /** * J2ME/J9 compatibility instead of Long.toHexString * * Copied from bluecove: * http://www.bluecove.org/bluecove/apidocs/com/intel/bluetooth/Utils.html */ public static String toHexString(long l) { StringBuffer buf = new StringBuffer(); String lo = Integer.toHexString((int) l); if (l > 0xffffffffl) { String hi = Integer.toHexString((int) (l >> 32)); buf.append(hi); for (int i = lo.length(); i < 8; i++) { buf.append('0'); } } buf.append(lo); return buf.toString(); } }