Here you can find the source of long2String(long x)
public static String long2String(long x)
//package com.java2s; //License from project: Apache License public class Main { public static String long2String(long x) { char[] cArray = long2char(x); StringBuilder sbResult = new StringBuilder(cArray.length); for (char c : cArray) { sbResult.append(c);/*from w w w .j a va 2 s. c om*/ } return sbResult.toString(); } public static char[] long2char(long x) { char[] c = new char[4]; c[0] = (char) (x >> 48); c[1] = (char) (x >> 32); c[2] = (char) (x >> 16); c[3] = (char) (x); return c; } }