public class DateUtils { public static final String SIMPLE_DATE_FORMAT = "MM月dd日"; public static final String DEFAULT_DATE_FORMAT = "yyyy-MM-dd"; public static final String DEFAULT_DATETIME_FORMAT1 = "yyyy-MM-dd HH:mm:ss"; public static final String DEFAULT_DATETIME_FORMAT2 = "yyyy-MM-dd HH:mm"; public static final String DEFAULT_DATETIME_FORMAT3 = "yyyy/MM/dd HH:mm:ss"; public static final String DEFAULT_DATETIME_FORMAT4 = "yyyy-MM-dd HH24:mm:ss"; public static final String DEFAULT_DATETIME_FORMAT5 = "yyyy-MM-dd HH24:mm"; public static final String DEFAULT_DATETIME_FORMAT6 = "YYYY-MM-DD:HH24:MI:SS"; public static final String DEFAULT_DATETIME_FORMAT7 = "yyyy/MM/dd"; public static final String DEFAULT_TIME_FORMAT = "HH:mm:ss"; public static final String OTHER_TIME_FORMAT = "HH:mm"; private static final long HOURS_PER_DAY = 24L; private static final long MINUTES_PER_HOUR = 60L; private static final long SECONDS_PER_MINUTE = 60L; private static final long MILLIONSECONDS_PER_SECOND = 1000L; private static final long MILLIONSECONDS_PER_MINUTE = 60000L; private static final long MILLIONSECONDS_SECOND_PER_DAY = 86400000L; public static TimeZone TIMEZONE_UTC = TimeZone.getTimeZone("UTC"); private static final SimpleDateFormat sdfYear = new SimpleDateFormat("yyyy"); private static final SimpleDateFormat sdfDay = new SimpleDateFormat("yyyy-MM-dd"); private static final SimpleDateFormat sdfDays = new SimpleDateFormat("yyyyMMdd"); private static final SimpleDateFormat sdfTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); private DateUtils() { } public static Date getDate(String date) { return getDate(date, "yyyy-MM-dd", (Date)null); } public static Date getMaxDate() { return getDate("9999-12-31", "yyyy-MM-dd", (Date)null); } public static Date getDateTime(String date) { if (StringUtils.isNotBlank(date)) { date = date.replaceAll("/", "-"); return getDate(date, "yyyy-MM-dd HH:mm:ss", (Date)null); } else { return null; } } public static long getDateMilles(Date date, String format) { String formateDate = (new SimpleDateFormat(format)).format(date); try { return (new SimpleDateFormat(format)).parse(formateDate).getTime(); } catch (ParseException var4) { var4.printStackTrace(); return 0L; } } public static Date getDate(String date, String format) { return getDate(date, format, (Date)null); } public static Date getDate(String date, String format, Date defVal) { Date d; try { d = (new SimpleDateFormat(format)).parse(date); } catch (ParseException var5) { d = defVal; } return d; } public static String formatDate(Date date) { return formatDate(date, "yyyy-MM-dd", (String)null); } public static String forDatetime(Date date) { return date != null ? formatDate(date, "yyyy-MM-dd HH:mm:ss", (String)null) : null; } public static String formatTime(Date date) { return formatDate(date, "HH:mm:ss", (String)null); } public static String formatTime(Date date, String format) { return formatDate(date, format, (String)null); } public static String formatDate(Date date, String format) { return formatDate(date, format, (String)null); } public static String formatDateTimeZone(Date date, String format, TimeZone timeZone) { String ret = null; try { SimpleDateFormat sdf = new SimpleDateFormat(format); sdf.setTimeZone(timeZone); ret = sdf.format(date); } catch (Exception var5) { var5.printStackTrace(); } return ret; } public static String formatDate(Date date, String format, String defVal) { String ret; try { ret = (new SimpleDateFormat(format)).format(date); } catch (Exception var5) { ret = defVal; } return ret; } public static Date plusDays(Date date, int days) { if (date == null) { date = getToday(); } return changeDays(date, days); } public static Date plusHours(Date date, int hours) { if (date == null) { date = getToday(); } return changeHours(date, hours); } public static Date plusMinute(Date date, int minutes) { if (date == null) { date = getToday(); } return changeMinute(date, minutes); } public static Date plusMonth(Date date, int months) { if (date == null) { date = getToday(); } return changeMonth(date, months); } public static Date plusYear(Date date, int years) { if (date == null) { date = getToday(); } return changeYear(date, years); } public static Date getToday() { return new Date(); } public static long currentTimeMillis() { return getToday().getTime(); } public static java.sql.Date getTodaySqlDate() { return new java.sql.Date(getToday().getTime()); } public static String getTodayStr(Date date, String format) { if (date == null) { date = getToday(); } if (StringUtils.isBlank(format)) { format = "yyyy-MM-dd"; } return formatDate(date, format); } public static int intervalDay(Date d1, Date d2) { if (d1 == null) { d1 = getToday(); } long intervalMillSecond = setToDayStartTime(d1).getTime() - setToDayStartTime(d2).getTime(); return (int)(intervalMillSecond / 86400000L); } public static int intervalMinutes(Date date1, Date date2) { long intervalMillSecond = date1.getTime() - date2.getTime(); return (int)(intervalMillSecond / 60000L + (long)(intervalMillSecond % 60000L > 0L ? 1 : 0)); } public static int intervalSeconds(Date date1, Date date2) { long intervalMillSecond = date1.getTime() - date2.getTime(); return (int)(intervalMillSecond / 1000L + (long)(intervalMillSecond % 1000L > 0L ? 1 : 0)); } public static Date setToDayStartTime(Date date) { Calendar calendar = Calendar.getInstance(); calendar.setTimeInMillis(date.getTime()); calendar.set(11, 0); calendar.set(12, 0); calendar.set(13, 0); calendar.set(14, 0); return calendar.getTime(); } public static Date setToDayEndTime(Date date) { Calendar calendar = Calendar.getInstance(); calendar.setTimeInMillis(date.getTime()); calendar.set(11, 23); calendar.set(12, 59); calendar.set(13, 59); calendar.set(14, 0); return calendar.getTime(); } public static String getDateStatus() { Calendar cal = Calendar.getInstance(); int hour = cal.get(11); if (hour >= 6 && hour < 12) { return "morning"; } else if (hour >= 12 && hour < 18) { return "noon"; } else { return hour >= 18 && hour < 24 ? "evning" : "midnight"; } } public static int getAge(Date birthday) { Calendar now = Calendar.getInstance(); Calendar birth = Calendar.getInstance(); birth.setTime(birthday); int year = birth.get(1); int age = now.get(1) - year; now.set(1, year); age = now.before(birth) ? age - 1 : age; return age; } public static boolean isSameDate(Date d1, Date d2) { if (d1 != null && d2 != null) { Calendar c1 = Calendar.getInstance(); c1.setTimeInMillis(d1.getTime()); Calendar c2 = Calendar.getInstance(); c2.setTimeInMillis(d2.getTime()); return c1.get(1) == c2.get(1) && c1.get(2) == c2.get(2) && c1.get(5) == c2.get(5); } else { return false; } } public static boolean isContinueDay(Date d1, Date d2) { if (d1 != null && d2 != null) { return intervalDay(d1, d2) == 1; } else { return false; } } public static Date truncDate(Date date) { Calendar c = Calendar.getInstance(); c.setTime(date); c.set(11, 0); c.set(12, 0); c.set(13, 0); return c.getTime(); } public static Date truncDateHour(Date date) { Calendar c = Calendar.getInstance(); c.setTime(date); c.set(12, 0); c.set(13, 0); return c.getTime(); } public static String getCnDecade(Date input) { String day = formatDate(input); String decade = day.replaceAll("01日", "上旬").replaceAll("11日", "中旬").replaceAll("21日", "下旬"); return decade; } public static Date getTodayZero() { Calendar c = Calendar.getInstance(); c.setTime(new Date()); c.set(11, 0); c.set(12, 0); c.set(13, 0); return c.getTime(); } public static Date getTheDayBefore(Date date) { return new Date(date.getTime() - 86400000L); } public static Date[] getTenDayBefore() { Date[] ret = new Date[2]; Calendar c = Calendar.getInstance(); c.setTime(new Date()); c.set(11, 0); c.set(12, 0); c.set(13, 0); int day = c.get(5); if (day < 10) { c.set(5, 1); ret[1] = new Date(c.getTime().getTime()); c.setTime(getTheDayBefore(c.getTime())); c.set(5, 21); ret[0] = new Date(c.getTime().getTime()); } else if (10 < day && day <= 20) { c.set(5, 1); ret[0] = new Date(c.getTime().getTime()); c.set(5, 11); ret[1] = new Date(c.getTime().getTime()); } else { c.set(5, 11); ret[0] = new Date(c.getTime().getTime()); c.set(5, 21); ret[1] = new Date(c.getTime().getTime()); } return ret; } public static Date[] getCurrentTenDay(Date input) { Date[] ret = new Date[2]; Calendar c = Calendar.getInstance(); c.setTime(input); c.set(11, 0); c.set(12, 0); c.set(13, 0); int day = c.get(5); if (day < 10) { c.set(5, 1); ret[0] = new Date(c.getTime().getTime()); c.set(5, 11); ret[1] = new Date(c.getTime().getTime()); } else if (10 < day && day <= 20) { c.set(5, 11); ret[0] = new Date(c.getTime().getTime()); c.set(5, 21); ret[1] = new Date(c.getTime().getTime()); } else { c.set(5, 21); ret[0] = new Date(c.getTime().getTime()); ret[1] = getNextMonthFirst(c.getTime()); } return ret; } public static Date getNextMonthFirst(Date date) { Calendar c = Calendar.getInstance(); c.setTime(date); c.set(11, 0); c.set(12, 0); c.set(13, 0); c.add(2, 1); c.set(5, 1); return c.getTime(); } public static Date[] getTheMonthBefore(Date date) { Date[] ret = new Date[2]; Calendar c = Calendar.getInstance(); c.setTime(date); c.set(11, 0); c.set(12, 0); c.set(13, 0); c.set(5, 1); ret[1] = new Date(c.getTime().getTime()); c.setTime(getTheDayBefore(c.getTime())); c.set(5, 1); ret[0] = new Date(c.getTime().getTime()); return ret; } public static Integer getCurrentQuarter() { int month = Integer.parseInt(formatDate(new Date(), "MM")); int quarter = 0; if (month >= 1 && month <= 3) { quarter = 1; } else if (month >= 4 && month <= 6) { quarter = 2; } else if (month >= 7 && month <= 9) { quarter = 3; } else if (month >= 10 && month <= 12) { quarter = 4; } return Integer.valueOf(quarter); } public static Map<String, String> getQuarterToYearMonthDay(Integer year, Integer quarter) { if (year != null && year.intValue() > 0 && quarter != null && quarter.intValue() > 0) { Map<String, String> map = new HashMap(); if (quarter.intValue() == 1) { map.put("startTime", year + "-01-" + getMonthDays(year, Integer.valueOf(1)) + " 00:00:00"); map.put("endTime", year + "-03-" + getMonthDays(year, Integer.valueOf(3)) + " 23:59:59"); } else if (quarter.intValue() == 2) { map.put("startTime", year + "-04-" + getMonthDays(year, Integer.valueOf(4)) + " 00:00:00"); map.put("endTime", year + "-06-" + getMonthDays(year, Integer.valueOf(6)) + " 23:59:59"); } else if (quarter.intValue() == 3) { map.put("startTime", year + "-07-" + getMonthDays(year, Integer.valueOf(7)) + " 00:00:00"); map.put("endTime", year + "-09-" + getMonthDays(year, Integer.valueOf(9)) + " 23:59:59"); } else if (quarter.intValue() == 4) { map.put("startTime", year + "-10-" + getMonthDays(year, Integer.valueOf(10)) + " 00:00:00"); map.put("endTime", year + "-12-" + getMonthDays(year, Integer.valueOf(12)) + " 23:59:59"); } return map; } else { return null; } } public static Integer getMonthDays(Integer year, Integer month) { if (year != null && year.intValue() > 0 && month != null && month.intValue() > 0) { Calendar c = Calendar.getInstance(); c.set(1, year.intValue()); c.set(2, month.intValue()); c.set(5, 1); c.add(5, -1); return c.get(5); } else { return Integer.valueOf(0); } } public static String getTimeDiffText(Date date1, Date date2) { long diff = Math.abs(date1.getTime() - date2.getTime()) / 1000L; long minuteSeconds = 60L; long hourSeconds = minuteSeconds * 60L; long daySeconds = hourSeconds * 24L; long weekSeconds = daySeconds * 7L; Date min = date1.compareTo(date2) < 0 ? date1 : date2; if (diff >= weekSeconds) { return formatDate(min); } else if (diff >= daySeconds) { return diff / daySeconds + "天前"; } else if (diff >= hourSeconds) { return diff / hourSeconds + "小时前"; } else { return diff >= minuteSeconds ? diff / minuteSeconds + "分钟前" : diff + "秒前"; } } public static int getWeek(Date dt) { int[] week = new int[]{7, 1, 2, 3, 4, 5, 6}; Calendar cal = Calendar.getInstance(); cal.setTime(dt); int w = cal.get(7) - 1; if (w < 0) { w = 0; } return week[w]; } public static Date getCurrentDate(String datePattern) { try { return (new SimpleDateFormat(datePattern)).parse(getCurrentDateByString(datePattern)); } catch (ParseException var2) { var2.printStackTrace(); return null; } } public static String getCurrentDateByString(String datePattern) { return (new SimpleDateFormat(datePattern)).format(System.currentTimeMillis()); } public static String getCurrentDateByString(Date date, String datePattern) { return (new SimpleDateFormat(datePattern)).format(date); } public static boolean beforeDate(Date date1, Date date2) { return date1.before(date2); } public static boolean beforeDate(String date1, String date2) { Date dt1 = null; Date dt2 = null; dt1 = getDateTime(date1); dt2 = getDateTime(date2); return beforeDate(dt1, dt2); } public static boolean betweenDateScope(String date, String from, String end) { if (date != null && from != null && end != null) { return !beforeDate(date, from) && beforeDate(date, end); } else { return false; } } public static boolean checkTimeRange(String time, String startRange, String endRange) { String[] s = startRange.split(":"); int totalStart = Integer.parseInt(s[0]) * 3600 + Integer.parseInt(s[1]) * 60 + Integer.parseInt(s[2]); String[] e = endRange.split(":"); int totalEnd = Integer.parseInt(e[0]) * 3600 + Integer.parseInt(e[1]) * 60 + Integer.parseInt(e[2]); String[] t = time.split(":"); int timeTotal = Integer.parseInt(t[0]) * 3600 + Integer.parseInt(t[1]) * 60 + Integer.parseInt(t[2]); return timeTotal >= totalStart && timeTotal <= totalEnd; } private static Date changeMinute(Date date, int minutes) { Calendar cal = Calendar.getInstance(); cal.setTime(date); cal.add(12, minutes); return cal.getTime(); } private static Date changeHours(Date date, int hours) { Calendar cal = Calendar.getInstance(); cal.setTime(date); cal.add(11, hours); return cal.getTime(); } private static Date changeDays(Date date, int days) { Calendar cal = Calendar.getInstance(); cal.setTime(date); cal.add(6, days); return cal.getTime(); } private static Date changeYear(Date date, int years) { Calendar cal = Calendar.getInstance(); cal.setTime(date); cal.add(1, years); return cal.getTime(); } private static Date changeMonth(Date date, int months) { Calendar cal = Calendar.getInstance(); cal.setTime(date); cal.add(2, months); return cal.getTime(); } public static Date getCurrentDayBegin() { Calendar calendar = new GregorianCalendar(); calendar.set(11, 0); calendar.set(12, 0); calendar.set(13, 0); return calendar.getTime(); } public static Date getCurrentDayEnd() { Calendar calendar = new GregorianCalendar(); calendar.set(11, 23); calendar.set(12, 59); calendar.set(13, 59); return calendar.getTime(); } public static Date getLastDayBegin() { Calendar calendar = new GregorianCalendar(); calendar.set(11, 0); calendar.set(12, 0); calendar.set(13, 0); calendar.add(5, -1); return calendar.getTime(); } public static Date getLastDayEnd() { Calendar calendar = new GregorianCalendar(); calendar.set(11, 23); calendar.set(12, 59); calendar.set(13, 59); calendar.add(5, -1); return calendar.getTime(); } public static Date getBeforeYesterdayBegin() { Calendar calendar = new GregorianCalendar(); calendar.set(11, 0); calendar.set(12, 0); calendar.set(13, 0); calendar.add(5, -2); return calendar.getTime(); } public static Date BeforeYesterdayEnd() { Calendar calendar = new GregorianCalendar(); calendar.set(11, 23); calendar.set(12, 59); calendar.set(13, 59); calendar.add(5, -2); return calendar.getTime(); } public static Date getCurrentMonthFirstDay() { Calendar calendar = Calendar.getInstance(); calendar.add(2, 0); calendar.set(11, 0); calendar.set(12, 0); calendar.set(13, 0); calendar.set(5, 1); return calendar.getTime(); } public static Date getLastMonthDayBegin() { Calendar calendar = new GregorianCalendar(); calendar.set(11, 0); calendar.set(12, 0); calendar.set(13, 0); calendar.add(5, -30); return calendar.getTime(); } public static Date getBeginTime() { Calendar calendar = new GregorianCalendar(); calendar.set(11, 0); calendar.set(12, 0); calendar.set(13, 0); calendar.add(1, -5); return calendar.getTime(); } public static String getYear() { return sdfYear.format(new Date()); } public static String getDay() { return sdfDay.format(new Date()); } public static String getDays() { return sdfDays.format(new Date()); } public static String getTime() { return sdfTime.format(new Date()); } public static boolean compareDate(String s, String e) { if (fomatDate(s) != null && fomatDate(e) != null) { return fomatDate(s).getTime() >= fomatDate(e).getTime(); } else { return false; } } public static boolean compareDate(Date d1, Date d2) { return d1.getTime() >= d2.getTime(); } public static Date fomatDate(String date) { SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd"); try { return fmt.parse(date); } catch (ParseException var3) { var3.printStackTrace(); return null; } } public static boolean isValidDate(String s) { SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd"); try { fmt.parse(s); return true; } catch (Exception var3) { return false; } } public static int getDiffYear(String startTime, String endTime) { SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd"); try { int years = (int)((fmt.parse(endTime).getTime() - fmt.parse(startTime).getTime()) / 86400000L / 365L); return years; } catch (Exception var4) { return 0; } } public static long getDaySub(String beginDateStr, String endDateStr) { long day = 0L; SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); Date beginDate = null; Date endDate = null; try { beginDate = format.parse(beginDateStr); endDate = format.parse(endDateStr); } catch (ParseException var8) { var8.printStackTrace(); } day = (endDate.getTime() - beginDate.getTime()) / 86400000L; return day; } public static String getAfterDayDate(String days) { int daysInt = Integer.parseInt(days); return getAfterDayDate(daysInt); } public static String getAfterDayDate(int daysInt) { Calendar canlendar = Calendar.getInstance(); canlendar.add(5, daysInt); Date date = canlendar.getTime(); SimpleDateFormat sdfd = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); String dateStr = sdfd.format(date); return dateStr; } public static String getAfterDayWeek(String days) { int daysInt = Integer.parseInt(days); Calendar canlendar = Calendar.getInstance(); canlendar.add(5, daysInt); Date date = canlendar.getTime(); SimpleDateFormat sdf = new SimpleDateFormat("E"); String dateStr = sdf.format(date); return dateStr; } public static String getSearchBeginDate(String date, DateUtils.SearchDateBuff buff) { StringBuilder builder = new StringBuilder(date); builder.append(" ").append(buff.toString()); return builder.toString(); } public static int getCurrentTime() { return (int)(System.currentTimeMillis() / 1000L); } public static String getSpecifiedDayBefore(String specifiedDay, String format, String defaultStr) { Calendar c = Calendar.getInstance(); Date date = null; String dayBefore = ""; try { date = (new SimpleDateFormat(format)).parse(specifiedDay); c.setTime(date); int day = c.get(5); c.set(5, day - 1); dayBefore = (new SimpleDateFormat(format)).format(c.getTime()); return dayBefore; } catch (Exception var7) { return defaultStr; } } public static enum SearchDateBuff { SEARCH_BEGIN_TIME("00:00:00"), SEARCH_END_TIME("23:59:59"); private String buff; private SearchDateBuff(String buff) { this.buff = buff; } public String toString() { return this.buff; } } }
- 浏览: 23146 次
文章分类
- 全部博客 (22)
- 今天有时间写一个计算两个日期之间有多少个日期 (1)
- java获取当前系统的所有进程列表 (1)
- spirng aop 切面 (1)
- soap wsdl webService (0)
- soap wsdl webService 基础 (1)
- dbcp 数据源 (1)
- svn 导出log的问题 代码统计量 (1)
- java date 比较两个日期的大小 simpladate 日期转换工具类 (1)
- java 日期 date处理 (1)
- springmvc mybatis 的一些感想 (1)
- js 前端 javascript (1)
- MyEclipse中点击Deploy MyEclipse J2EE Project to Server无响应解决方法 (1)
- jquery ajax 异步 (1)
- @ResponseBody 的注解应用 (1)
- Mybatis 调用存储过程 statementType要设置为"CALLABLE" (0)
- .. UserService] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)} at org (1)
- 随机验证码 前台登录 (1)
- java 读写word java 动态写入 模板文件 (1)
- js函数 汇总大全 非空 非数字 电话号码 身份证 等验证 (1)
- 多个字段 按要求的字段排序 (1)
- 系统间消息通信 socket (1)
- java 开发中常用日期工具类 (1)
- java 线程卡死 (0)
最新评论
-
xianbin:
ironlee 写道为什么不用joda是的。参考:http:/ ...
java 开发中常用日期工具类 -
ironlee:
为什么不用joda
java 开发中常用日期工具类
评论
2 楼
xianbin
2018-01-11
ironlee 写道
为什么不用joda
是的。参考:http://www.joda.org/joda-time/
1 楼
ironlee
2018-01-10
为什么不用joda
相关推荐
java常用开发工具类大全,涵盖常见工作的问题,常用的日期工具类等等,非常强大和全面。
字符串工具类/数据类型转换类/集合工具类/数组工具类/Properties文件操作类/常用流操作工具类/编码工具类/Json工具类/日期工具类/下载文件工具类/解压ZIP工具类/文件编码转码
提供了很丰富的java工具类,包括字符串、数字、日期、文件、图像、编码解码、校验工具、文档操作等。 主要分为以下几种: - 1.通用操作类,例如String、数字、日期、各种校验等 - 2.文档操作,excel、pdf等 - 3.加密...
这是自己整理的,结合公司日常开发,用到的一些常用的日期工具类。
java工具类,包含了字符串类型,数据类型,MD5,日期时间类型,文件上传工具类,正则表达式帮助类等28个java开发的常用工具。
该工具类包含了日常开发中常用的日期转换,类型转换的方法 解决String转Date类型,Date转String类型所引发的问题
工作5年精心整理_Java常用工具类源码 收集了java项目开中常用的工具操作类,方法非常全,可应用在大部份java 项目中。 提供了很丰富的java工具类,包括字符串、数字、日期、文件、图像、编码解码、校验工具、文档...
封装了很多实用的工具类,包括日期操作,字符串操作,读写表格操作,身份证工具获取年龄,生日,地区,性别等,接口请求工具类 加解密算法,签名验证算法 封装发送请求的方等;
对于日期,随机字符,时间差计算,拼音转换,金额计算转换,网络图片保存,身份证出生日期获取,字符串首字母获取,年月加减计算等
java开发中常用的工具类 比如 1:hibernate的配置 工具类复写 2:字符串加密 MD5加密 3:javabean到map的自动映射封装 4:javabean java对象到xml的自动封装 5:各种日期格式的处理 6:json的自动封装处理 7:...
在Java开发类库中,提供了很多工具类,我们即将学习最常见的工具类,比如对日期的操作,对集合的操作等。具体更多的工具类,请参考JavaDoc文档。 2. java.util.Date类 Date类包装了毫秒值,毫秒值表示自1970年1月1...
包含个人开发过程中常用工具类报,供大家方便提供,包含aes加密,格式化,excel导入导出,日期处理,IP获取,json转换等
java开发中常用到的工具类。附有帮助文档。可以方便查看。如果需要源码的可以联系我。主要包括http-post请求工具类。日期工具类。字符串工具类。配置文件properties读取工具类。
java开发工作多年总结的的一些工具类; 包括有: 1、常用的日期类操作 2、excel操作 3、xml操作 4、集成科大讯飞语言合成工具类; 5、集合类操作(list,map,array) 6、FTP工具类 7、csv操作 8、file文件类操作 9...
java开发过程中常用的工具类,导入可直接使用。包括日期、文件上传、分页、MD5、获取绝对路径、以及记录日志的工具类等。
fastjson,base64,redis,fileupload,jdbc,百度定位,localcache,断言,集合,日期,empty,异常,io(图片截图、压缩、获取像素以及文件的下载、拷贝、删除、循环读、等等),protocol(支持http&https;...
java常用工具类,里面有数据库、日期处理、字符转转换等常用功能!
Android开发中常用的工具类集合 gradle使用方式 Step 1. Add the JitPack repository to your build file allprojects { repositories { ... maven { url 'https://jitpack.io' } } } Step 2. Add the ...
汇总了Java学习开发过程中常用的一些工具类,如字符串处理的StringUtils,日期处理的DateUtils,生成32位不重复的随机数、文件操作,xml操作,文件上传下载,收发邮件等。
JavaLibJAVA开发,常用工具集概述JavaLib,是一个Java开发基础工具类库,对项目开发中常用的工具进行封装,如:加密、http请求、API接口等。目的是帮助开发者更快速、更快捷的开发。目标:无侵入性,轻量级,常用...