· Naughties
· · 2005
· · · September
· · · · 19 (1 entry)

In or Out? · I have <a href='http://www.tbray.org/ongoing/When/200x/2005/06/06/Java1.5#p-1'>previously questioned</a> the what seem like weird method names in Java’s newish <a href='http://java.sun.com/j2se/1.5.0/docs/api/java/lang/ProcessBuilder.html'>ProcessBuilder</a> API. It turns out that its not-newish-at-all close personal friend <a href='http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Process.html'>Process</a> is little strange too: it has <code>getOutputStream</code> and <code>getInputStream</code> which respectively get you pipes to the process’ standard <em>input</em> and <em>output</em>. Data comes <em>out</em> of the Process and you want an <code>InputStream</code>, so it has to be <code>getInputStream</code>. But how can <code>getOutput</code> get you the input while <code>getError</code> gets you the error? OK, call me anal, I can take it. But I’m writing a class right now kinda like <code>Process</code>, and I simply absolutely can’t bring myself to call the input the output and vice versa. So I have <code>getTaskInput</code>, <code>getTaskOutput</code>, and <code>getTaskError</code>, which produce output, input, and input streams respectively. We all have to deal with the confusing nature of reality in our own ways.
author · Dad · software · colophon · rights
Random image, linked to its containing fragment


I am an employee of Amazon.com, but the opinions expressed here are my own, and no other party necessarily agrees with them.

A full disclosure of my professional interests is on the author page.