public class FileHelper{ <spanstyle="white-space:pre"> </span>//第一种获取文件内容方式 public byte[] getContent(String filePath) throws IOException{ File file =new File(filePath);
longfileSize = file.length(); if (fileSize> Integer.MAX_VALUE) { System.out.println("file too big..."); returnnull; }