import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public class tttt {
public static void main(String[] args) {
String lujing = "//2560P-PC/ServerMsgList/111.sisenmsg";//远程地址和文件 可根据需要更改
File file = new File(lujing);
if (!file.getParentFile().exists()) {
file.getParentFile().mkdirs();
}
try {
file.createNewFile();
} catch (IOException e) {
e.printStackTrace();
}
try {
FileWriter fw = new FileWriter(file, false);
BufferedWriter bw = new BufferedWriter(fw);
bw.write("False
True
hello worodddada");
bw.flush();
bw.close();
fw.close();
} catch (IOException e) {
e.printStackTrace();
}
try {
FileReader fr = new FileReader(file);
BufferedReader bReader = new BufferedReader(fr);
String string = bReader.readLine();
System.out.println(string);
fr.close();
bReader.close();
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
}