由于java无法获取ANSI文件中无法获取 “€” 字符,所以通过正则表达式分割字符,解决方法如下
public void readFileByScanner()throws Exception{
FileInputStream fis = new FileInputStream("E:\\a_12400_20140922_VGOP-R1.6-11201_00.verf");
Scanner scanner = new Scanner(fis,"iso-8859-1");
scanner.useDelimiter(Pattern.compile("\\x80"));
while(scanner.hasNext()){
System.out.println(scanner.next());
}
fis.close();
}
}