解决ansi编码的txt文件中文乱码问题:
FileInputStream fis = new FileInputStream(file) ;
BufferedInputStream bis = new BufferedInputStream(fis, 1024);
ByteArrayOutputStream bos = new ByteArrayOutputStream(1024);
byte[] cache = new byte[1024];
int length = 0;
while ((length = bis.read(cache)) != -1) {
bos.write(cache, 0, length); }