Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Runtime.exec() and character encodings



Craig Mattocks <email@hidden> wrote:

>Can you provide a good example which illustrates how to use your
>glguerin.util.Streamer class in your Authorization Toolkit:
>
><http://www.amug.org/~glguerin/sw/#authkit>
>
>to pump an InputStream to an OutputStream in a separate thread with a
>waitFor() call on the main thread?

I also used Streamer in the Humble Narrator:
<http://www.amug.org/~glguerin/sw/#narrator>

See Humble.speak() and Humble.eat().


>Is something the new JDK 1.5 ProcessBuilder class will do?

Doesn't seem to be. I can't find anything about "drain the stream", which
is what Streamer and its daemon-threads are for, in the ProcessBuilder API:
<http://java.sun.com/j2se/1.5.0/docs/api/java/lang/ProcessBuilder.html>

All I can see in ProcessBuilder that's related to streams is the ability to
coalesce stdout and stderr to a single stream. Without that facility,
you'd need some kind of Y-stream that did the coalescing, or make both
Streamer-daemons write to the same OutputStream.

-- GG
_______________________________________________
java-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/java-dev
Do not post admin requests to the list. They will be ignored.




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.