code: public static byte[] readFile(File file) throws IOException
      {
          //create stream to file
          InputStream inputStream=new FileInputStream(file);
  
          //read data
          byte[] data=IOHelper.readStream(inputStream);
  
          return data;
      }
docs: Reads the data from the file.
  
  @param   file
  The file
  @return  The data read from the provided file
  @throws  IOException
  Any IO exception