1. 不使用Web项目格式。其他项目结构自选。(swing,console)
2. 读写文本文件(特定的编码格式,例如:GB2312) 
3. 第二步读出来的内容去掉没有使用的字符。(保留英文字符,数字,下划线)
4. 第三步把得到的字符串反转过来,全变成大写.  123123a ---- >  A321321
5. 插入用户信息,或者取得系统用户,或者写死(汉字或者韩文)
6. 插入以上内容的长度,创建日期,保密日期(创建日期 + 45天,去除周末)
7. 把以上6步处理完的东西写入一个新文件(UTF-8编码格式)。

解决方案 »

  1.   

    倒不难,就是比较麻烦,以下是一段关于读写的代码,你在copy操作转换的时候做你要做的操作就行了:
    import java.io.*public class StreamUtil {
    /**
     * 功能:把一个文件内容复制到另一文件中(可做更改)
     * 
     * @param a,b
     *            文件名
     * @return ret 是否复制成功
     */
    public static boolean copy(String aa, String bb) {
    boolean ret = false;
    File a = new File(aa);
    File b = new File(bb);
    FileInputStream in = null;
    FileOutputStream out = null;
    try {
    in = new FileInputStream(a);
    out = new FileOutputStream(b);
    } catch (FileNotFoundException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    }
    InputStreamReader is = new InputStreamReader(in);
    BufferedReader br = new BufferedReader(is);
    PrintStream ps = new PrintStream(out);
    String s = "";
    int i = 1;
    try {
    while ((s = br.readLine()) != null) {
    s = "第" + i + "行是:" + s;
    i++;
    ps.println(s);
    }
    } catch (IOException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    } finally {
    try {
    br.close();
    ps.close();
    } catch (IOException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    }
    }
    return ret;
    } /**
     * 功能:把从控制台输入的内容复制到另一文件中(可做更改)
     * 
     * @param file
     *            文件名
     * @return ret 是否复制成功
     */
    public static boolean xie(File file) {
    boolean ret = false;
    FileOutputStream fos = null;
    PrintStream out = null; try {
    //指定输入
    InputStreamReader isr = new InputStreamReader(System.in);
    BufferedReader in = new BufferedReader(isr);
    //指定输出
    fos = new FileOutputStream(file);
    out = new PrintStream(fos); String context = null;//从键盘读到的一行信息 while ((context = in.readLine()) != null) {
    //根据输入的内容判断是否退出
    if ("exit".equalsIgnoreCase(context)) {
    break;
    }
    //写信息到文件
    out.println(context);
    }
    } catch (FileNotFoundException e) {
    e.printStackTrace();
    } catch (IOException e) {
    e.printStackTrace();
    } finally {
    try {
    out.close();
    fos.close();
    } catch (IOException e) {
    e.printStackTrace();
    }
    }
    return ret;
    } /**
     * @param args
     */
    public static void main(String[] args) {
    // TODO Auto-generated method stub
    StreamUtil s = new StreamUtil();
    s.copy("d:\\test.txt", "d:\\test1.txt");
    }}
      

  2.   


    5. 插入用户信息,或者取得系统用户,或者写死(汉字或者韩文) 
    6. 插入以上内容的长度,创建日期,保密日期(创建日期 + 45天,去除周末) ============
    或者寫死,寫死不就結了。45天不算周末就是9個禮拜了。
    創建日記+9個禮拜=保密日期。
    用Calendar類。