码迷,mamicode.com
首页 > Web开发 > 详细

网页抄代码专用

时间:2019-12-15 12:45:33      阅读:124      评论:0      收藏:0      [点我收藏+]

标签:代码   substr   code   read   file   ade   edr   java   stream   

import java.io.*;

public class Translate {
    public static void main(String[] args) throws IOException {
        String fileName = "a";
        File a = new File(fileName);
        File b = new File(fileName + ".java");
        b.createNewFile();
        PrintWriter printWriter = new PrintWriter(new FileOutputStream(b));
        BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(new FileInputStream(a)));
        String line = null;
        while ((line = bufferedReader.readLine()) != null) {
            printWriter.println(line.substring(line.indexOf(".")+1));
            printWriter.flush();
        }
    }
}

网页抄代码专用

标签:代码   substr   code   read   file   ade   edr   java   stream   

原文地址:https://www.cnblogs.com/shun-w/p/12042119.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!