当需要从 SDcard 中读取含有中文的文件时,字节定义应为 byte buffbyte = new byte[1024],正常为 byte[20] 即可。
FileInputStream fin = null ;
BufferedInputStream buffin = null ;
try{
fin = openFileInput(MUSICFILE) ;
buffin = new BufferedInputStream(fin) ;
DataInputStream dis = new DataInputStream(fin) ;
int length = dis.available() ;
byte[] buffbyte = new byte[length] ;//这样可灵活的读取
}
buffin.close() ;
}catch(Exception e){
e.printStackTrace() ;
}