Package org.oddjob.io
Class TeeType
java.lang.Object
org.oddjob.io.TeeType
- All Implemented Interfaces:
ArooaValue,ArooaSessionAware
Description
Split output to multiple other outputs.Example
Copy a buffer to stdout, the log, and to a file.
<oddjob>
<job>
<sequential>
<jobs>
<properties>
<values>
<value key="work.dir" value="work/io"/>
</values>
</properties>
<copy>
<input>
<buffer>Duplicate This!
</buffer>
</input>
<output>
<tee>
<outputs>
<stdout/>
<logout/>
<file file="${work.dir}/TeeTypeTest.txt"/>
</outputs>
</tee>
</output>
</copy>
</jobs>
</sequential>
</job>
</oddjob>
Copy data to stdout as it is being read during a copy from one buffer to
another.
<oddjob>
<job>
<copy>
<input>
<tee>
<input>
<buffer>This will be copied when read.
</buffer>
</input>
<outputs>
<stdout/>
</outputs>
</tee>
</input>
<output>
<buffer/>
</output>
</copy>
</job>
</oddjob>
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidsetArooaSession(ArooaSession session) Accept the current Arooa Session.voidsetInput(ArooaValue input) voidsetOutputs(int index, ArooaValue output)
-
Constructor Details
-
TeeType
public TeeType()
-
-
Method Details
-
setArooaSession
Description copied from interface:ArooaSessionAwareAccept the current Arooa Session.- Specified by:
setArooaSessionin interfaceArooaSessionAware- Parameters:
session- The Arooa Session. Never null.
-
setInput
- Reference Property:
- input
- Required:
- Only if this type is required to be an input stream.
Description
An input stream that will be copied to the outputs. -
setOutputs
- Reference Property:
- outputs
- Required:
- No, output will be thrown away if missing.
Description
List of outputs to split to. -
toInputStream
-
toOutputStream
public OutputStream toOutputStream() throws NoConversionAvailableException, ConversionFailedException
-