docs: public static byte[] fileToBytes(File path) throws IOException {
          FileInputStream fin = new FileInputStream(path);
          byte[] buffer = new byte[(int) fin.getChannel().size()];
          try {
              if (fin.read(buffer) == -1) {
                  throw new IOException("File " + path.getAbsolutePath() + " is empty");
              }
          } finally {
              fin.close();
          }
          return buffer;
      }