freehell

随笔分类 -  JAVASE

JVM启动时加载的Charset你注意了么?
摘要:package org.chinasoft.io;import java.io.File;import java.io.FileInputStream;import java.io.FileOutputStream;import java.io.InputStream;import java.io.OutputStreamWriter;import java.io.Writer;public class TestCharset { public static void main(String[] args) throws Exception { String path = "i:&q 阅读全文

posted @ 2010-10-27 21:37 freehell 阅读(212) 评论(0) 推荐(0)

文件树的建立和文件拷贝
摘要:目标:实现将一个folder下的file和folder分别复制和创建在指定的folder之下;递归创建文件树,使用IO流实现文件拷贝package com.softstone.t;import java.io.File;import java.io.FileInputStream;import java.io.FileOutputStream;import java.io.IOException;/** * 实现将一个folder下的file和folder分别复制和创建在指定的folder之下; * 递归创建文件树,使用IO流实现文件拷贝 * @author lilei * */public 阅读全文

posted @ 2010-10-26 19:38 freehell 阅读(294) 评论(0) 推荐(0)

File类兼谈回调
摘要:目标:File类的实质,熟悉File类中的回调操作要求:示例代码:Test1.javapackage org.chinasoft.io;import java.io.File;import java.io.IOException;public class Test1 { /** * 为了研究代码本身对异常直接抛出 * @param args 输入参数列表 * @throws IOException 抛出的可能的异常类对象 */ public static void main(String[] args) throws IOException { File file = new Fi... 阅读全文

posted @ 2010-10-23 11:02 freehell 阅读(185) 评论(0) 推荐(0)

[置顶] 单循环实现菱形的打印
摘要:public class Diamond { public static void main(String[] args) { printSelf(7); } public static void printSelf(int arg) { final int LINE = arg; final int HALF = LINE/2; for(int i=0; i<LINE*LINE; i++) { int row = i/LINE;//表示的是元素所在的行号 int col = i%LINE;//表示的是每行元素的编号从0开始到6结束 //换行的条件 if(i > 0... 阅读全文

posted @ 2010-10-10 18:24 freehell 阅读(223) 评论(0) 推荐(0)

Eclipse3.2.1汉化过程
摘要:Eclipse3.2.1汉化过程注意在汉化Eclipse前不能打开Eclipse,否者汉化可能失败一、下载Eclipse3.2.1二、下载对应Eclipse版本的汉化包,可以在Eclipse的官方网站http://download.eclipse.org/在进行搜索Eclipse language pack找到对应的汉化包三、安装Eclipse,将Eclipse解压,这里解压到E:/JAVAIDE/eclipse-SDK-3.2.1-win32/eclipse文件夹下,然后解压下载来的汉化包,解压后可以看到有一个名为eclipse的文件夹下面有两个子文件夹:features、plugins四、 阅读全文

posted @ 2010-05-11 18:18 freehell 阅读(347) 评论(0) 推荐(0)

导航