title: How to write a byte array to OutputStream of process builder (Java)
body: <pre><code>byte[] bytes = value.getBytes();
  Process q = new ProcessBuilder("process","arg1", "arg2").start();
  q.getOutputStream().write(bytes);
  q.getOutputStream().flush();
  System.out.println(q.getInputStream().available());
  </code></pre>
  
  <p>I'm trying to stream file contents to an executable and capture the output but the output(InputStream) is always empty. I can capture the output if i specify the the file location but not with streamed input.</p>
  
  <p>How might I overcome this?</p>