List of usage examples for java.lang Long toString
public static String toString(long i)
From source file:Main.java
public static String getTimeStamp() { return Long.toString(System.currentTimeMillis() / 1000); }
From source file:Main.java
public static String getTimestampStr() { return Long.toString(System.currentTimeMillis()); }
From source file:Main.java
/** * * @return/*from ww w. j a v a2 s .c o m*/ */ public static final String getStringTimeStamp() { return Long.toString(System.currentTimeMillis() / 1000); }
From source file:Main.java
public static String getUnixTimeStamp() { long unixTime = System.currentTimeMillis() / 1000; return Long.toString(unixTime); }
From source file:Main.java
public static String temperatureConverter(double temp) { final long roundedTemp = Math.round(temp); return Long.toString(roundedTemp); }
From source file:Main.java
public static String getTimestamp() { Calendar cal = Calendar.getInstance(); return Long.toString(cal.getTimeInMillis() / 1000); }
From source file:Main.java
public static String getUUID() { long num = System.currentTimeMillis(); // Log.d("SortUtil", "" + num); return Long.toString(num); }
From source file:Main.java
public static String humanSize(Long ds) { String textuse = ""; if (ds < 1024) { textuse = (Long.toString(ds) + "B"); } else if (ds < (1024 * 1024)) { textuse = (Long.toString(ds / 1024) + "K"); } else if (ds < (1024 * 1024 * 1024)) { textuse = (Long.toString(ds / (1024 * 1024)) + "MB"); } else {//from www.j a va2 s .c o m textuse = (Long.toString(ds / (1024 * 1024 * 1024)) + "GB"); } return textuse; }
From source file:Main.java
public static void setLongContent(Element elem, long value) { setTextContent(elem, Long.toString(value)); }
From source file:Main.java
public static int getDurationToInt(long duration) { int d = 0;/*from w ww . j av a 2s . c om*/ try { BigDecimal b = new BigDecimal(Long.toString(duration)); BigDecimal one = new BigDecimal("1000"); d = b.divide(one, 0, BigDecimal.ROUND_CEILING).intValue(); } catch (Exception e) { e.printStackTrace(); d = 0; } return d; }