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

In or Out? · I have pre­vi­ous­ly ques­tioned the what seem like weird method names in Java’s newish Pro­cessBuilder API. It turns out that its not-newish-at-all close per­son­al friend Pro­cess is lit­tle strange too: it has getOut­putStream and getIn­putStream which re­spec­tive­ly get you pipes to the process’ stan­dard in­put and out­put. Da­ta comes out of the Pro­cess and you want an In­putStream, so it has to be getIn­putStream. But how can getOut­put get you the in­put while getEr­ror gets you the er­ror? OK, call me anal, I can take it. But I’m writ­ing a class right now kin­da like Pro­cess, and I sim­ply ab­so­lute­ly can’t bring my­self to call the in­put the out­put and vice ver­sa. So I have getTaskIn­put, getTaskOut­put, and getTaskEr­ror, which pro­duce out­put, in­put, and in­put streams re­spec­tive­ly. We all have to deal with the con­fus­ing na­ture of re­al­i­ty in our own ways.
author · Dad · software · colophon · rights
Random image, linked to its containing fragment

By .

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.