public class Main {
public static void main(String[] args) throws IOException {
// 将inputstream转换成字符流
InputStreamReader inputStreamReader = new InputStreamReader(System.in);
//
BufferedReader reader = new BufferedReader(inputStreamReader);
File file = new File("D:\\A.txt");
FileWriter fileWriter = new FileWriter(file);
BufferedWriter writer = new BufferedWriter(fileWriter);
String line;
while (!(line = reader.readLine()).equals("quit")) {