易截截图软件、单文件、免安装、纯绿色、仅160KB

Java 时间范围 Util

 import java.util.Date;
public class TimeSpan
{
public final static TimeSpan ZERO = new TimeSpan(0);

private long _totalMilliSeconds = 0;

public TimeSpan(long totalMilliSeconds)
{
_totalMilliSeconds = totalMilliSeconds;
}

public TimeSpan(Date afterDate, Date beforeDate)
{
this(afterDate.getTime() - beforeDate.getTime());
}

public long getMilliSeconds()
{
return _totalMilliSeconds;
}
public long getSeconds()
{
return Math.round(_totalMilliSeconds/1000);
}
public long getMinutes()
{
return Math.round(_totalMilliSeconds/(1000*60));
}
public long getHours()
{
return Math.round(_totalMilliSeconds/(1000*60*60));
}
}


相关文档:

java操作Excel

// 创建Excel
    String destFileName = tableName + ".xls";//文件名
    response.setContentType("application/vnd.ms-excel");
    response.setHeader("Content-Disposition", "attachment; filename=".concat(String .valueOf(destFileNa ......

JAVA虚拟机字符串池相关(笔记)

 JAVA虚拟机有一个字符串池,对于字符串池的访问可以使用字符串对象的intern()方法,可动态向池中添加对象,它的定义如下:
public native String intern();
这是一个本地方法,在调用这个方法时,JAVA虚拟机首先检查字符串池中是否存在与该字符串对象值相等的对象,如果存在就返回字符串池中的对象的引用,否则就新创建一个 ......

java 多线程

 package server;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Container;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.geom.Ellipse2D;
import java.awt.geom.Recta ......

Java 如何取得操作系统的属性

 import java.util.Enumeration;
import java.util.HashMap;
import java.util.Properties;
public class SystemProperties
{
public static String LINE_SEPARATOR = "line.separator";
public static String FILE_SEPARATOR = "file.separator";
public static String USER_LANGUAGE = "user.language"; ......

Java 文件 Util

 import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import com.paic.is.dispatch.TMPEntry;
public class FileUtil
{
public static File getFileByRelativePath(String ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号