public static void copyFileToStream(File from, OutputStream out) throws IOException {
    try (InputStream in = new BufferedInputStream(new FileInputStream(from))) {
      copyStream(in, out);
    }
  }
public static void copyFileToStream(File from, OutputStream out)