public class 类名 {
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new FileReader("src/ch.txt"));
BufferedWriter bw = new BufferedWriter(new FileWriter("src/re.txt"));
String line = null;
List<String> list = new ArrayList<>();
while((line = br.readLine()) !=null) {
if("***** *****".equals(line)) {
line=("需要替换的内容");
}
bw.write(line);
if(br.ready())
bw.newLine();
}
bw.close();
br.close();
}
}