public static byte[] getBytes(File file) throws IOException {
    try (FileInputStream stream = new FileInputStream(file)) {
      return readBytes(stream, (int)file.length());
    }
  }
public static byte[] getBytes(File file)