标签:代码 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