code: public static byte[] copyToByteArray(File in) throws IOException {
          assert in != null : "No input File specified";
  
          return copyToByteArray(new BufferedInputStream(Files.newInputStream(in.toPath())));
      }
docs: Copy the contents of the given input File into a new byte array.
  
  @param in the file to copy from
  @return the new byte array that has been copied to
  @throws IOException in case of I/O errors