Example usage for java.lang Long valueOf

List of usage examples for java.lang Long valueOf

Introduction

In this page you can find the example usage for java.lang Long valueOf.

Prototype

@HotSpotIntrinsicCandidate
public static Long valueOf(long l) 

Source Link

Document

Returns a Long instance representing the specified long value.

Usage

From source file:Main.java

public static Long getLongValue(Element paramElement) {
    return Long.valueOf(getText(paramElement));
}

From source file:Main.java

public static String getDateTimeByMillisecond(String str, String type) {
    Date date = new Date(Long.valueOf(str));
    SimpleDateFormat format = new SimpleDateFormat(type);
    String time = format.format(date);
    return time;/*from w w  w . j a v a  2s .  c om*/
}

From source file:Main.java

private static long extractLong(Uri uri, int index) {
    return Long.valueOf(extract(uri, index));
}

From source file:Main.java

public static String formatDateStr(String dateStr, String format) {
    Timestamp ts = new Timestamp(Long.valueOf(dateStr));
    return new SimpleDateFormat(format).format(ts);
}

From source file:Main.java

public static String transferTime(String timestamp) {
    String newValue = "";
    long ts = Long.valueOf(timestamp);
    SimpleDateFormat df = new SimpleDateFormat("MMM d\nHH:mm");
    newValue = df.format(ts);/*w w  w  . j  a va 2s  .  c o m*/
    return newValue;
}

From source file:Main.java

public static String getSimpleMonthString(String curmills) {
    SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMM");
    long timeSta = Long.valueOf(curmills);
    return dateFormat.format(timeSta);
}

From source file:Main.java

public static String getStrTime(String cc_time, SimpleDateFormat sdf) {
    String re_StrTime = null;/*w w w  .  j  a  v  a 2 s .  co  m*/
    long lcc_time = Long.valueOf(cc_time);
    re_StrTime = sdf.format(new Date(lcc_time * 1000L));

    return re_StrTime;

}

From source file:Main.java

public static String showLog() {
    long l2 = (Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) / 1024L;
    Object[] arrayOfObject = new Object[1];
    arrayOfObject[0] = Long.valueOf(l2);
    return l2 + "";
}

From source file:Main.java

public static Long steamidtoacountid(String steamId) {
    return steamidtoacountid(Long.valueOf(steamId));

}

From source file:Main.java

public static String getRealDataFixDay(String data) {
    SimpleDateFormat sdf5 = new SimpleDateFormat("yyyy-MM-dd");
    Date d = new Date(Long.valueOf(data));
    return sdf5.format(d);
}