code: private static String getLeadingZeros(int i, int size)
  	{
  		assert i <= size;
  		int w1 = (int) Math.floor(Math.log10(size));
  		int w2 = (int) Math.floor(Math.log10(i));
  		
  		String s = "";
  
  		for (int j = w2; j < w1; j++)
  		{
  			s += "0";
  		}
  		return s;
  	}
docs: Prepares an int for printing with leading zeros for the given size.
  @param i the int to prepare
  @param size max value for i
  @return printable string for i with leading zeros