我正在使用以下代码读取文本文件,
try (BufferedReader br = new BufferedReader(new FileReader(<file.txt>))) {
for (String line; (line = br.readLine()) != null;) {
//I want to skip a line with unicode character and continue next line
if(line.toLowerCase().startsWith("\\u")){
continue;
//This is not working because i get the character itself and not the text
}
}
}
文本文件:
如何在读取文件时跳过所有 unicode 字符?
炎炎设计
慕姐4208626
冉冉说
相关分类