上一页 1 ··· 640 641 642 643 644 645 646 647 648 ··· 784 下一页
摘要: public class Singleton { /** * 类级的内部类,也就是静态的成员式内部类,该内部类的实例与外部类的实例 * 没有绑定关系,而且只有被调用到才会装载,从而实现了延迟加载 */ private static class SingletonH... 阅读全文
posted @ 2015-02-04 22:11 沧海一滴 阅读(1359) 评论(0) 推荐(0) 编辑
摘要: 以前我一直以为File#renameTo(File)方法与OS下面的 move/mv 命令是相同的,可以达到改名、移动文件的目的。不过后来经常发现问题:File#renameTo(File)方法会返回失败(false),文件没有移动,又查不出原因,再后来干脆弃用该方法,自己实现一个copy方法,问题 阅读全文
posted @ 2015-02-04 18:59 沧海一滴 阅读(5441) 评论(3) 推荐(0) 编辑
摘要: I created a copy of the tar archive and copied to entire content to it. Then I delete the old tar archive.public void appendFileInTarArchive(String ta... 阅读全文
posted @ 2015-02-04 18:48 沧海一滴 阅读(540) 评论(0) 推荐(0) 编辑
摘要: include my own version for your reference. We use this one to zip up photos to download so it works with various unzip programs. It preserves the dire... 阅读全文
posted @ 2015-02-04 18:46 沧海一滴 阅读(312) 评论(0) 推荐(0) 编辑
摘要: Creating a zip file is a task that can easily be accomplished by using the classes ZipOutputStream and ZipEntry in the java.util.zip package.First of ... 阅读全文
posted @ 2015-02-04 18:35 沧海一滴 阅读(343) 评论(0) 推荐(0) 编辑
上一页 1 ··· 640 641 642 643 644 645 646 647 648 ··· 784 下一页