http://sizeed.blog.163.com/blog/static/96525451201152292810544/
byte[] bt = null;
FileInputStream stream = null;
ByteArrayOutputStream out = null;
try {
stream = new FileInputStream(fileName);
out = new ByteArrayOutputStream(1000);
byte[] b = new byte[1000];
int len = 0;
while ((len = stream.read(b)) != -1) {
out.write(b, 0, len);
}
stream.close();
out.close();
bt = out.toByteArray();
Log.i("byteArray", ""+bt);
} catch (Exception e) {
e.printStackTrace();