Here you can find the source of parseNanoseconds(String s)
static int parseNanoseconds(String s)
//package com.java2s; // (c) 2012 B Smith-Mannschott -- Distributed under the Eclipse Public License public class Main { static int parseNanoseconds(String s) { if (s == null) { return 0; } else if (s.length() < 9) { return Integer.parseInt(s + "000000000".substring(s.length())); } else {//www. j a va 2s .c o m return Integer.parseInt(s); } } }