[brailleblaster] Re: searching java reference

  • From: "qubit" <lauraeaves@xxxxxxxxx>
  • To: <brailleblaster@xxxxxxxxxxxxx>
  • Date: Thu, 9 Dec 2010 17:59:53 -0600

PS: I have done the fork and exec in C and so have fiddled with pipes 
before, but I have no idea how this works on java -- I call Runtime.exec to 
get the Process but has the process started at that point? or is it waiting 
for me to call Process.start();
And am I in the parent or the child process, like after a fork() in C?
It seems I call Runtime.exec and only then am I able to access the 
get*Stream() methods.  Is there some more complete documentation on these 
classes?
--le

----- Original Message ----- 
From: "qubit" <lauraeaves@xxxxxxxxx>
To: <brailleblaster@xxxxxxxxxxxxx>
Sent: Thursday, December 09, 2010 5:41 PM
Subject: [brailleblaster] Re: searching java reference


Sina, the docs say

InputStream getErrorStream();
InputStream getInputStream();
OutputStream getOutputStream();

If I'm the parent process and just spawned this process, then the last 2
return types should be switched as I will be writing to input and reading
from output.
Note that err and out are treated inconsistently.

Is this a bug? Do I need to do some obscure pipe operations to get the input
and output flowing correctly? Then why was err handled differently from out?
You're a java expert, perhaps you can settle this. I am just now getting
ready to compile my code, which should tell me if my types are mismatched.
I'll be posting to list hopefully soon.
TIA
--le

----- Original Message ----- 
From: "Sina Bahram" <sbahram@xxxxxxxxx>
To: <brailleblaster@xxxxxxxxxxxxx>
Sent: Thursday, December 09, 2010 5:11 PM
Subject: [brailleblaster] Re: searching java reference


The human part of javadoc can be incorrect, although I find this doubtful.

However, the actual return type of the methods, as you've discussed, are not
incorrect. They might not meet expectations, but it is
automatically generated, so I find it next to impossible for this to be
incorrect.

Take care,
Sina
-----Original Message-----
From: brailleblaster-bounce@xxxxxxxxxxxxx
[mailto:brailleblaster-bounce@xxxxxxxxxxxxx] On Behalf Of qubit
Sent: Thursday, December 09, 2010 5:49 PM
To: brailleblaster@xxxxxxxxxxxxx
Subject: [brailleblaster] searching java reference

Is there an easyer way to search the java reference pages by class or by
category? I'm having a fun time playing with process and
runtime and streams and the like, but some of the docs are indeed incorrect,
despite what Mike is saying.
I am looking at the link you sent me about the getInputStream() etc methods
in class Process.
Perhaps I will go look for a download link, but I don't have much space on
my hd.

I will post what I have so far shortly, but indeed I know the docs are
wrong, because they are inconsistent.  Compiling will solve
the dilemma.
--le





Other related posts: