Here you can find the source of intToString(final long v, final int length)
public static String intToString(final long v, final int length)
//package com.java2s; //License from project: Open Source License public class Main { public static String intToString(final long v, final int length) { final StringBuilder sb = new StringBuilder("" + v); while (sb.length() < length) { sb.insert(0, "0"); }//www . j a v a 2s . c om return sb.toString(); } }