代码
//文件内容提取到byte数组里
public byte[] readFromFile(String fileName){
File srcFile=new File(fileName);
byte[] b_Array=new byte[(int)srcFile.length()];
try{
FileInputStream fileInput=new FileInputStream(fileName);
fileInput.read(b_Array, 0, (int)srcFile.length());
}catch(FileNotFoundException e){
e.printStackTrace();
}catch(Exception e){
e.printStackTrace();
}
return b_Array;
}
//*****************************************************************************