[brailleblaster] Re: more on spawning processes

  • From: "John J. Boyer" <johnjboyer@xxxxxxxxxxxxx>
  • To: brailleblaster@xxxxxxxxxxxxx
  • Date: Tue, 7 Dec 2010 22:32:46 -0600

Laura,

Good news on two fronts. Hopefully the baby has arrived by now. I'm 
certainly saying prayers.

Using java.langProcess to run filters is good if the amount of data is 
fairly small, as it probably would be in most cases for itex2MML The 
slowdown would probably not be noticeable. We can put your code in a 
package called org.brailleblaster.util Send it to the list as an 
attachment. I should be able to push my code on Thursday, and then you 
can push yours.

John

On Tue, Dec 07, 2010 at 05:17:51PM -0600, qubit wrote:
> Wow, I'm just now this afternoon getting to the brailleblaster code.  I had 
> something important come up that I had to take care of all morning.
> 
> Also, hope you don't mind an off topic announcement -- my niece is even now 
> in labor with her first baby.  It is a boy they will name Benjamin.  He 
> should be arriving sometime tonight or tomorrow.  First baby in his 
> generation.  It is very exciting -- so hope you'll forgive this diversion. 
> But look at it this way -- you could say my niece is in the "spawning 
> process".  (More seriously, happy thoughts and prayers if you say them are 
> welcome.)
> 
> Anyway, back to java, it appears that java defines a platform independent 
> way of running a filter and feeding it input and collecting its output in 
> buffers.  This will make it possible to run the itex2MML command completely 
> independently rather than cutting into the code to make a JNI library.
> Hopefully it can come in handy for other utilities as well.
> 
> I did run across something that looks erroneous in the java class 
> documentation online.  In particular, there are 3 functions that set up 
> pipes to manage standard in, out and err:
> 
> abstract InputStream getErrorStream()
>               Gets the error stream of the subprocess.
> abstract InputStream getInputStream()
>     gets the input stream of the subprocess
> abstract OutputStream getOutputStream()
>     get output stream of subprocess
> 
> Note the return types are inconsistent.  The first declaration is right, but 
> the second and third should have swapped return types (if I'm interpreting 
> this right).
> 
> I haven't tried compiling any code yet as I'm still writing it.  I hope this 
> is the right approach.  I did a fair amount of googling and reading of 
> opensource projects, but for our purposes, I think just using the process 
> classes in java.lang is sufficient.
> 
> Any objections send to the list.
> Thanx and happy hacking.
> --le
> 
> 

-- 
My websites:
GodTouches Digital Ministry, Inc. http://www.godtouches.org
Abilitiessoft, Inc. http://www.abilitiessoft.com
Location: Madison, WI, USA


Other related posts: