commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cris Perdue <c...@perdues.com>
Subject ProcessUtils and support classes offer
Date Fri, 27 Aug 2004 15:46:08 GMT
Hello,

I would like to offer a small set of classes that I think would make 
good additions to the Jakarta Commons project. The main class is called 
ProcessUtils, and supporting classes move data from an InputStream to an 
OutputStream, or from a Reader to a Writer.  These are versions of 
classes that I have used from time to time for three or four years, 
though preparing them for public release has motivated me to do some 
reimplementation and to do a little cleanup of the public APIs, not to 
mention beefing up the docs.

The purpose of the main ProcessUtils class is to make it simpler to call 
external programs and receive the results back.  It was inspired 
especially by the TCL exec function and also resembles the Perl backtick 
operator.  A simple call to "df" using the simplest form of call could 
look something like:

String filestats = ProcessUtils.exec(new String[] {"df"});

The package handles program output to "standard error" and nonzero exit 
codes.

API documentation and a JAR archive with both source and binary are at 
http://perdues.com/process-utils.html.  I would like to get feedback 
from you all about the possibility of contributing this in some way to 
Jakarta Commons.

Cheers,
Cris Perdue


Mime
View raw message