ansi符号化のtxtファイルの中国語の文字化けの問題を解決します
480 ワード
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); }