| Modifier and Type | Class and Description |
|---|---|
| private class |
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private boolean | alwaysLogOut
Flag which indicates that output should be always sent to the log |
| private boolean | |
| private boolean | appendOut
Flag which indicates if error and output files are to be appended. |
| private boolean | appendProperties
Whether to complete properties settings |
| private Redirector. | baos
Buffer used to capture output for storage into a property |
| private boolean | |
| private boolean | createEmptyFilesOut
Flag which indicates whether files should be created even when empty. |
| private static final String | |
| private boolean | |
| private boolean | discardOut
Flag which indicates if error and output files are to be discarded. |
| private final Object | errMutex
Mutex for err |
| private File[] | error
The file(s) to which standard error is being redirected |
| private Redirector. | errorBaos
Buffer used to capture error output for storage into a property |
| private String | errorEncoding
The error encoding |
| private Vector | errorFilterChains
The error filter chains |
| private PrintStream | errorPrintStream
Stream which is used for line oriented error output |
| private String | errorProperty
The name of the property into which error output is to be stored |
| private OutputStream | errorStream
The stream for error output |
| private final Object | inMutex
Mutex for in |
| private File[] | input
The file(s) from which standard input is being taken. |
| private String | inputEncoding
The input encoding |
| private Vector | inputFilterChains
The input filter chains |
| private InputStream | inputStream
The stream for input |
| private String | inputString
String from which input is taken |
| private boolean | logError
Indicates if standard error should be logged to Ant's log system rather than the output. |
| private boolean | logInputString
whether to log the inputstring |
| private final ProjectComponent | managingTask
The task for which this redirector is working |
| private File[] | out
The file(s) receiving standard output. |
| private final Object | outMutex
Mutex for out |
| private PrintStream | outPrintStream
Stream which is used for line oriented output |
| private String | outputEncoding
The output encoding |
| private Vector | outputFilterChains
The output filter chains |
| private boolean | outputIsBinary
Is the output binary or can we safely split it into lines? |
| private String | outputProperty
The name of the property into which output is to be stored |
| private OutputStream | outputStream
The stream for output data |
| private static final int | |
| private final ThreadGroup | threadGroup
The thread group used for starting |
| Access | Constructor and Description |
|---|---|
| public | Redirector(final Task
the task for which the redirector is to work managingTask)Create a redirector instance for the given task |
| public | Redirector(final ProjectComponent
the project component for which the redirector is to work managingTask)Create a redirector instance for the given task |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public ExecuteStreamHandler | Returns: the execute stream handler to manage the input, output and error streams.Create the StreamHandler to use with our Execute instance. |
| public void | |
| private void | |
| private OutputStream | |
| public OutputStream | Returns: the redirector's error stream or null if no output has been configuredGet the error stream for the redirector |
| public InputStream | Returns: the redirector's input stream or null if no output has been configuredGet the input stream for the redirector |
| public OutputStream | Returns: the redirector's output stream or null if no output has been configuredGet the output stream for the redirector |
| protected void | handleErrorFlush(final String
the error information being flushed. output)Handle a flush operation on the error stream |
| protected void | |
| protected void | |
| protected int | Returns: the number of bytes readthe buffer into which data is to be read. buffer, final int the offset into the buffer at which data is stored. offset, final int the amount of data to read length)Handle an input request |
| protected void | handleOutput(final String
the data to be output output)Pass output sent to System.out to specified output. |
| private void | |
| public void | setAlwaysLog(final boolean
booleanIf true, (error and non-error) output will be "teed", redirected as specified while being sent to Ant's logging mechanism as if no redirection had taken place. |
| public void | setAppend(final boolean
if true output and error streams are appended to their
respective files, if specified. append)Whether output should be appended to or overwrite an existing file. |
| public void | setAppendProperties(final boolean
whether to append properties. appendProperties)This |
| public void | setBinaryOutput(final boolean
boolean b)Whether to consider the output created by the process binary. |
| public void | setCreateEmptyFiles(final boolean
boolean.Whether output and error files should be created even when empty. |
| public void | setDiscardError(final boolean
if true error streams are discarded. discard)Whether error output should be discarded. |
| public void | setDiscardOutput(final boolean
if true output streams are discarded. discard)Whether output should be discarded. |
| public void | |
| public void | |
| public void | |
| public void | setErrorFilterChains(final Vector<FilterChain>
Vector containing FilterChain.Set the error |
| public void | setErrorProperty(final String
the name of the property to be set with the error output. errorProperty)Property name whose value should be set to the error of the process. |
| public void | |
| public void | |
| public void | |
| public void | setInputFilterChains(final Vector<FilterChain>
Vector containing FilterChain.Set the input |
| pack-priv void | setInputStream(final InputStream
the stream from which input will be read inputStream)Set a stream to use as input. |
| public void | setInputString(final String
the string which is used as the input source inputString)Set the string to use as input |
| public void | setLogError(final boolean
if true the standard error is sent to the Ant log system and
not sent to output. logError)Controls whether error output of exec is logged. |
| public void | setLogInputString(final boolean
true or false. logInputString)Set whether to include the value of the input string in log messages. |
| public void | |
| public void | |
| public void | |
| public void | setOutputFilterChains(final Vector<FilterChain>
Vector containing FilterChain.Set the output |
| public void | setOutputProperty(final String
the name of the property to be set with the task's output. outputProperty)Property name whose value should be set to the output of the process. |
| public void | |
| private void | setPropertyFromBAOS(final ByteArrayOutputStream
contains the property value. baos, final String the property name. propertyName)Set a property from a ByteArrayOutputStream |
| alwaysLogErr | back to summary |
|---|---|
| private boolean alwaysLogErr | |
| alwaysLogOut | back to summary |
|---|---|
| private boolean alwaysLogOut Flag which indicates that output should be always sent to the log | |
| appendErr | back to summary |
|---|---|
| private boolean appendErr | |
| appendOut | back to summary |
|---|---|
| private boolean appendOut Flag which indicates if error and output files are to be appended. | |
| appendProperties | back to summary |
|---|---|
| private boolean appendProperties Whether to complete properties settings | |
| baos | back to summary |
|---|---|
| private Redirector. Buffer used to capture output for storage into a property | |
| createEmptyFilesErr | back to summary |
|---|---|
| private boolean createEmptyFilesErr | |
| createEmptyFilesOut | back to summary |
|---|---|
| private boolean createEmptyFilesOut Flag which indicates whether files should be created even when empty. | |
| DEFAULT_ENCODING | back to summary |
|---|---|
| private static final String DEFAULT_ENCODING | |
| discardErr | back to summary |
|---|---|
| private boolean discardErr | |
| discardOut | back to summary |
|---|---|
| private boolean discardOut Flag which indicates if error and output files are to be discarded. | |
| errMutex | back to summary |
|---|---|
| private final Object errMutex Mutex for err | |
| error | back to summary |
|---|---|
| private File[] error The file(s) to which standard error is being redirected | |
| errorBaos | back to summary |
|---|---|
| private Redirector. Buffer used to capture error output for storage into a property | |
| errorEncoding | back to summary |
|---|---|
| private String errorEncoding The error encoding | |
| errorFilterChains | back to summary |
|---|---|
| private Vector<FilterChain> errorFilterChains The error filter chains | |
| errorPrintStream | back to summary |
|---|---|
| private PrintStream errorPrintStream Stream which is used for line oriented error output | |
| errorProperty | back to summary |
|---|---|
| private String errorProperty The name of the property into which error output is to be stored | |
| errorStream | back to summary |
|---|---|
| private OutputStream errorStream The stream for error output | |
| inMutex | back to summary |
|---|---|
| private final Object inMutex Mutex for in | |
| input | back to summary |
|---|---|
| private File[] input The file(s) from which standard input is being taken. If > 1, files' content will be concatenated in the order received. | |
| inputEncoding | back to summary |
|---|---|
| private String inputEncoding The input encoding | |
| inputFilterChains | back to summary |
|---|---|
| private Vector<FilterChain> inputFilterChains The input filter chains | |
| inputStream | back to summary |
|---|---|
| private InputStream inputStream The stream for input | |
| inputString | back to summary |
|---|---|
| private String inputString String from which input is taken | |
| logError | back to summary |
|---|---|
| private boolean logError Indicates if standard error should be logged to Ant's log system rather than the output. This has no effect if standard error is redirected to a file or property. | |
| logInputString | back to summary |
|---|---|
| private boolean logInputString whether to log the inputstring | |
| managingTask | back to summary |
|---|---|
| private final ProjectComponent managingTask The task for which this redirector is working | |
| out | back to summary |
|---|---|
| private File[] out The file(s) receiving standard output. Will also receive standard error unless standard error is redirected or logError is true. | |
| outMutex | back to summary |
|---|---|
| private final Object outMutex Mutex for out | |
| outPrintStream | back to summary |
|---|---|
| private PrintStream outPrintStream Stream which is used for line oriented output | |
| outputEncoding | back to summary |
|---|---|
| private String outputEncoding The output encoding | |
| outputFilterChains | back to summary |
|---|---|
| private Vector<FilterChain> outputFilterChains The output filter chains | |
| outputIsBinary | back to summary |
|---|---|
| private boolean outputIsBinary Is the output binary or can we safely split it into lines? | |
| outputProperty | back to summary |
|---|---|
| private String outputProperty The name of the property into which output is to be stored | |
| outputStream | back to summary |
|---|---|
| private OutputStream outputStream The stream for output data | |
| STREAMPUMPER_WAIT_INTERVAL | back to summary |
|---|---|
| private static final int STREAMPUMPER_WAIT_INTERVAL | |
| threadGroup | back to summary |
|---|---|
| private final ThreadGroup threadGroup The thread group used for starting | |
| Redirector | back to summary |
|---|---|
| public Redirector(final Task managingTask) Create a redirector instance for the given task
| |
| Redirector | back to summary |
|---|---|
| public Redirector(final ProjectComponent managingTask) Create a redirector instance for the given task
| |
| complete | back to summary |
|---|---|
| public void complete() throws IOException Complete redirection. This operation will close any streams and create any specified property values.
| |
| createHandler | back to summary |
|---|---|
| public ExecuteStreamHandler createHandler() throws BuildException Create the StreamHandler to use with our Execute instance.
| |
| createStreams | back to summary |
|---|---|
| public void createStreams() Create the input, error and output streams based on the configuration options. | |
| errorStreams | back to summary |
|---|---|
| private void errorStreams() | |
| foldFiles | back to summary |
|---|---|
| private OutputStream foldFiles(final File[] file, final String logHead, final int loglevel, final boolean append, final boolean createEmptyFiles) | |
| getErrorStream | back to summary |
|---|---|
| public OutputStream getErrorStream() Get the error stream for the redirector
| |
| getInputStream | back to summary |
|---|---|
| public InputStream getInputStream() Get the input stream for the redirector
| |
| getOutputStream | back to summary |
|---|---|
| public OutputStream getOutputStream() Get the output stream for the redirector
| |
| handleErrorFlush | back to summary |
|---|---|
| protected void handleErrorFlush(final String output) Handle a flush operation on the error stream
| |
| handleErrorOutput | back to summary |
|---|---|
| protected void handleErrorOutput(final String output) Process error output
| |
| handleFlush | back to summary |
|---|---|
| protected void handleFlush(final String output) Process data due to a flush operation.
| |
| handleInput | back to summary |
|---|---|
| protected int handleInput(final byte[] buffer, final int offset, final int length) throws IOException Handle an input request
| |
| handleOutput | back to summary |
|---|---|
| protected void handleOutput(final String output) Pass output sent to System.out to specified output.
| |
| outStreams | back to summary |
|---|---|
| private void outStreams() outStreams | |
| setAlwaysLog | back to summary |
|---|---|
| public void setAlwaysLog(final boolean alwaysLog) If true, (error and non-error) output will be "teed", redirected as specified while being sent to Ant's logging mechanism as if no redirection had taken place. Defaults to false.
| |
| setAppend | back to summary |
|---|---|
| public void setAppend(final boolean append) Whether output should be appended to or overwrite an existing file. Defaults to false.
| |
| setAppendProperties | back to summary |
|---|---|
| public void setAppendProperties(final boolean appendProperties) This
| |
| setBinaryOutput | back to summary |
|---|---|
| public void setBinaryOutput(final boolean b) Whether to consider the output created by the process binary. Binary output will not be split into lines which may make error and normal output look mixed up when they get written to the same stream.
| |
| setCreateEmptyFiles | back to summary |
|---|---|
| public void setCreateEmptyFiles(final boolean createEmptyFiles) Whether output and error files should be created even when empty. Defaults to true.
| |
| setDiscardError | back to summary |
|---|---|
| public void setDiscardError(final boolean discard) Whether error output should be discarded. Defaults to false.
| |
| setDiscardOutput | back to summary |
|---|---|
| public void setDiscardOutput(final boolean discard) Whether output should be discarded. Defaults to false.
| |
| setError | back to summary |
|---|---|
| public void setError(final File error) Set the file to which standard error is to be redirected.
| |
| setError | back to summary |
|---|---|
| public void setError(final File[] error) Set the files to which standard error is to be redirected.
| |
| setErrorEncoding | back to summary |
|---|---|
| public void setErrorEncoding(final String errorEncoding) Set the error encoding.
| |
| setErrorFilterChains | back to summary |
|---|---|
| public void setErrorFilterChains(final Vector<FilterChain> errorFilterChains) Set the error
| |
| setErrorProperty | back to summary |
|---|---|
| public void setErrorProperty(final String errorProperty) Property name whose value should be set to the error of the process.
| |
| setInput | back to summary |
|---|---|
| public void setInput(final File input) Set the input to use for the task
| |
| setInput | back to summary |
|---|---|
| public void setInput(final File[] input) Set the input to use for the task
| |
| setInputEncoding | back to summary |
|---|---|
| public void setInputEncoding(final String inputEncoding) Set the input encoding.
| |
| setInputFilterChains | back to summary |
|---|---|
| public void setInputFilterChains(final Vector<FilterChain> inputFilterChains) Set the input
| |
| setInputStream | back to summary |
|---|---|
| pack-priv void setInputStream(final InputStream inputStream) Set a stream to use as input.
| |
| setInputString | back to summary |
|---|---|
| public void setInputString(final String inputString) Set the string to use as input
| |
| setLogError | back to summary |
|---|---|
| public void setLogError(final boolean logError) Controls whether error output of exec is logged. This is only useful when output is being redirected and error output is desired in the Ant log
| |
| setLogInputString | back to summary |
|---|---|
| public void setLogInputString(final boolean logInputString) Set whether to include the value of the input string in log messages. Defaults to true.
| |
| setOutput | back to summary |
|---|---|
| public void setOutput(final File out) File the output of the process is redirected to. If error is not redirected, it too will appear in the output
| |
| setOutput | back to summary |
|---|---|
| public void setOutput(final File[] out) Files the output of the process is redirected to. If error is not redirected, it too will appear in the output
| |
| setOutputEncoding | back to summary |
|---|---|
| public void setOutputEncoding(final String outputEncoding) Set the output encoding.
| |
| setOutputFilterChains | back to summary |
|---|---|
| public void setOutputFilterChains(final Vector<FilterChain> outputFilterChains) Set the output
| |
| setOutputProperty | back to summary |
|---|---|
| public void setOutputProperty(final String outputProperty) Property name whose value should be set to the output of the process.
| |
| setProperties | back to summary |
|---|---|
| public void setProperties() Notify the | |
| setPropertyFromBAOS | back to summary |
|---|---|
| private void setPropertyFromBAOS(final ByteArrayOutputStream baos, final String propertyName) Set a property from a ByteArrayOutputStream
| |
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private final String |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Overrides java. Implements java. ByteArrayOutputStream has no effect.
|
| closed | back to summary |
|---|---|
| private boolean closed | |
| property | back to summary |
|---|---|
| private final String property | |
| PropertyOutputStream | back to summary |
|---|---|
| pack-priv PropertyOutputStream(final String property) | |
| close | back to summary |
|---|---|
| public void close() throws IOException Overrides java. Implements java. Doc from java. Closing a
| |