title: which is the equivalent command for execute a curl command in windows java?
body: <p>An equivalent command for something like this  I don't know which is the correct form to call a batch command </p>
  
  <pre><code>def proc =["/bin/sh",      "-c","curl  https://stackoverflow.com"]
  
       proc.waitFor()
       StringBuffer outputStream = new StringBuffer()
       proc.waitForProcessOutput(outputStream, System.err)
       String output = outputStream.toString()
  </code></pre>