FileInputStream in = new FileInputStream(文件路径File); byte[] buffer = new byte[in.available()]; in.read(buffer);
in.available()返回的是数组字节长度int;