List of usage examples for java.lang Long parseLong
public static long parseLong(String s, int radix) throws NumberFormatException
From source file:my.extensions.app.DateTimeFormatter.java
private String format(String message) { String msg = ""; try {//from ww w. ja va2s . co m long ms = Long.parseLong(message, 10); msg = DateFormatUtils.format(ms, "yyyy-MM-dd HH:mm:ss"); } catch (Exception e) { msg = e.getMessage(); } return msg; }
From source file:com.jaeksoft.searchlib.util.Sequence.java
public Sequence(File file, int radix) throws NumberFormatException, IOException { this.radix = radix; this.file = file; if (file.exists()) if (file.length() > 0) counter = Long.parseLong(FileUtils.readFileToString(file), radix); }