using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Data; using System.Security.Cryptography; namespace HRPOWER.BLL { /// <summary> /// 业务逻辑层基类 /// </summary> public class BaseClass { /// <summ…
File类常用的方法 获取功能的方法 public String getAbsolutePath() :返回此File的绝对路径名字符串. public String getPath() :将此File转换为路径名字符串. public String getName() :返回由此File表示的文件或目录的名称. public long length() :返回由此File表示的文件的长度. 判断功能的方法 public boolean exists() :此File表示的文件或目录是否实际存在…
经常处理一些日期相关的信息,Calendar类是处理日期的常用类,写下几个方法,不用重复造轮子了. 1.求上一天,下一天的日期 Date now = new Date();Calendar c = Calendar.getInstance();c.setTime(now);c.add(Calendar.DAY_OF_MONTH, -1); // 下一天,上一天-1改为1Date yesterday = c.getTime();SimpleDateFormat sdf = new SimpleDa…