征集常用工具类

ScAREcrOw_ss 2009-12-02 06:20:23
征集一些大家常用的工具类,回复多的话我可以整理修改打包分发给大家

比如 一些ID生成类,加密类,随机字符生成类,文件检索 总之要比较通用,其实就是大家经常会 ctrl+c ctrl+v的代码.代码片段也可以,我有空会做整理.


各种类型的工具类都可以.
...全文
151 14 打赏 收藏 转发到动态 举报
写回复
用AI写文章
14 条回复
切换为时间正序
请发表友善的回复…
发表回复
ScAREcrOw_ss 2009-12-03
  • 打赏
  • 举报
回复
........
ScAREcrOw_ss 2009-12-03
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 bolink5 的回复:]
看到LZ 的结贴率 我就有点。。。
[/Quote]

我刚来这里 不知道 结贴 怎么个意思?
zfangla 2009-12-03
  • 打赏
  • 举报
回复

/**清除临时文件夹下的所有文件和目录.*/
public static void clearDir(String dir)
{
if (!dir.equals(""))
{
String str = "";
String os = System.getProperty("os.name");
if (os.startsWith("Windows"))
{
str = "cmd.exe /c rmdir /Q /S " + dir;
}
else
{
str = "rm -r " + dir;
}
try{
Process pro = Runtime.getRuntime().exec(str);
pro.waitFor();
}
catch(Exception ee)
{
}
}
}
shine333 2009-12-03
  • 打赏
  • 举报
回复
commons-lang
commons-collections
commons-io
NeverGiveUp2016 2009-12-02
  • 打赏
  • 举报
回复
算了,看你那么诚心,给你一个我常用的吧。
数据库导入,就是不用人工建表,用程序建表。
package steven_linqing;
import org.hibernate.cfg.Configuration;
import org.hibernate.tool.hbm2ddl.SchemaExport;

public class ExportDB {
public static void main(String[] args) {
Configuration cgf = new Configuration().configure();
SchemaExport export = new SchemaExport(cgf);
export.create(true, true);
}
}
到时候,记得给我打包发来啊,呵呵!我的邮箱是:steven_linqing@126.com
NeverGiveUp2016 2009-12-02
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 bolink5 的回复:]
  看到LZ 的结贴率 我就有点。。。
[/Quote]
同感!
somsport 2009-12-02
  • 打赏
  • 举报
回复
楼主好注意啊!!!顶!!!
LPZLSDJF 2009-12-02
  • 打赏
  • 举报
回复
谁有?能分享吗?
laker_914 2009-12-02
  • 打赏
  • 举报
回复
都是些在实际的项目中积累下来的呢。
zh112146024 2009-12-02
  • 打赏
  • 举报
回复
jiang5495 2009-12-02
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 bolink5 的回复:]
  看到LZ 的结贴率 我就有点。。。
[/Quote]
Pss_Best 2009-12-02
  • 打赏
  • 举报
回复
弄好了 给我也发一份
bolink5 2009-12-02
  • 打赏
  • 举报
回复
看到LZ 的结贴率 我就有点。。。
晴天1999 2009-12-02
  • 打赏
  • 举报
回复
新手哈!多多指教哟!

62,614

社区成员

发帖
与我相关
我的任务
社区描述
Java 2 Standard Edition
社区管理员
  • Java SE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧