SRJRCFrames
v0.1.296

de.schwarzrot.system
Class CommandReader

java.lang.Object
  extended by de.schwarzrot.system.CommandReader

public class CommandReader
extends Object

class to execute an external (command line) application, with support for processing output from that application. It will add an executor for files, that are not really executables, like scripts of jar-files.

Author:
Reinhard Mantey

Constructor Summary
CommandReader(List<String> cmdArgs)
           
CommandReader(List<String> cmdArgs, String userName)
           
CommandReader(String command)
           
CommandReader(String command, String userName)
           
 
Method Summary
protected  void dump()
           
protected  void initCommand(List<String> cmdParts)
           
protected  void initCommand(String rawCmd)
           
static boolean isExecutable(File file2Execute)
           
 boolean isRedirectError()
           
 void setCharset(String charSet)
           
 void setDirectory(File dir)
           
 void setRedirectError(boolean redirectError)
           
 Process start()
           
 BufferedReader startErrorReader(Process proc)
           
 BufferedReader startReader(Process proc)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommandReader

public CommandReader(List<String> cmdArgs)

CommandReader

public CommandReader(List<String> cmdArgs,
                     String userName)

CommandReader

public CommandReader(String command)

CommandReader

public CommandReader(String command,
                     String userName)
Method Detail

isRedirectError

public final boolean isRedirectError()
Returns:
the redirectError

setCharset

public void setCharset(String charSet)

setDirectory

public void setDirectory(File dir)

setRedirectError

public final void setRedirectError(boolean redirectError)
Parameters:
redirectError - the redirectError to set

start

public Process start()
              throws IOException
Throws:
IOException

startErrorReader

public BufferedReader startErrorReader(Process proc)

startReader

public BufferedReader startReader(Process proc)

dump

protected void dump()

initCommand

protected void initCommand(List<String> cmdParts)

initCommand

protected void initCommand(String rawCmd)

isExecutable

public static boolean isExecutable(File file2Execute)

SRJRCFrames
v0.1.296

hosted at
Find SRJRCFrames at SourceForge.net. Fast, secure and free:
           Open Source Software download
Submit a bug or request a feature

SRJRCFrames is published according to the GNU General Public License
Copyright 2005-2012 Reinhard Mantey - some rights reserved.