Here you can find the source of long2FourChars(long i)
Parameter | Description |
---|---|
i | a parameter |
public static char[] long2FourChars(long i)
//package com.java2s; //License from project: LGPL public class Main { /**/*from w w w . ja v a 2 s .co m*/ * Converts a long to a char array of four elements * @param i * @return */ public static char[] long2FourChars(long i) { char[] asChars = new char[4]; asChars[0] = (char) (i >>> 48); asChars[1] = (char) ((i >>> 32) & 0xFFFF); asChars[2] = (char) ((i >>> 16) & 0xFFFF); asChars[3] = (char) (i & 0xFFFF); return asChars; } }