Here you can find the source of hashToName(long l)
Parameter | Description |
---|---|
l | the long to convert. |
public static String hashToName(long l)
//package com.java2s; //License from project: Open Source License public class Main { /** A table of valid characters. */ public static final char VALID_CHARS[] = { '_', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '!', '@', '#', '$', '%', '^', '&', '*', '(', ')', '-', '+', '=', ':', ';', '.', '>', '<', ',', '"', '[', ']', '|', '?', '/', '`' }; /**//w w w.j a v a2 s . co m * Converts a long hash to a string. * * @param l * the long to convert. * @return the converted string. */ public static String hashToName(long l) { int i = 0; char ac[] = new char[12]; while (l != 0L) { long l1 = l; l /= 37L; ac[11 - i++] = VALID_CHARS[(int) (l1 - l * 37L)]; } return new String(ac, 12 - i, i); } }