Here you can find the source of LongToString(Long l, int length)
public static String LongToString(Long l, int length)
//package com.java2s; //License from project: Open Source License public class Main { public static String LongToString(Long l, int length) { char[] output = new char[length]; while (length-- > 0) { output[length] = int2Char((int) (l & 3)); l >>= 2;/*from w w w. j a v a 2 s. co m*/ } return new String(output); } /** converts from 2-bit representation to character representation */ public static char int2Char(int i) { switch (i) { case 0: return 'A'; case 1: return 'T'; case 2: return 'G'; case 3: return 'C'; } return 'n'; } }