|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.oddjob.io.BufferType
public class BufferType
A buffer can be used wherever input or output can be specified. A job
A buffer can be initialised with text, or lines of text and will can also provide it's contents as text.
<oddjob id="this"> <job> <sequential> <jobs> <variables id="v"> <buff> <buffer/> </buff> </variables> <copy id="foo"> <from> <file file="${this.args[0]}/work/io/buffer_example.txt"/> </from> <output> <value value="${v.buff}"/> </output> </copy> <echo id="e">${v.buff}</echo> </jobs> </sequential> </job> </oddjob>
<oddjob id="this"> <job> <sequential id="jobs"> <jobs> <variables id="v"> <buff> <buffer/> </buff> </variables> <echo>apples <output> <value value="${v.buff}"/> </output> </echo> <echo>oranges <output> <value value="${v.buff}"/> </output> </echo> <echo>${v.buff}</echo> </jobs> </sequential> </job> </oddjob>
<oddjob id="this"> <job> <sequential> <jobs> <mkdir dir="${this.args[0]}/work/io"/> <variables id="v"> <buff> <buffer> <lines> <list> <values> <value value="apples"/> <value value="oranges"/> </values> </list> </lines> </buffer> </buff> </variables> <copy> <input> <value value="${v.buff}"/> </input> <output> <file file="${this.args[0]}/work/io/buffer_example.txt"/> </output> </copy> </jobs> </sequential> </job> </oddjob>
<oddjob id="this"> <job> <sequential> <jobs> <variables id="v"> <buff> <buffer>apples oranges</buffer> </buff> </variables> <foreach> <values> <value value="${v.buff.lines}"/> </values> <configuration> <xml> <foreach id="f"> <job> <echo>Line ${f.index} is ${f.current}.</echo> </job> </foreach> </xml> </configuration> </foreach> </jobs> </sequential> </job> </oddjob>
Nested Class Summary | |
---|---|
static class |
BufferType.Conversions
|
Constructor Summary | |
---|---|
BufferType()
|
Method Summary | |
---|---|
void |
configured()
The configuration for the bean has been fully configured. |
void |
destroy()
The configuration for the bean is about to be destroyed. |
String[] |
getLines()
|
String |
getText()
|
void |
initialised()
The configuration for the bean has been initialised. |
void |
setLines(String[] lines)
|
void |
setText(String text)
|
InputStream |
toInputStream()
|
OutputStream |
toOutputStream()
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BufferType()
Method Detail |
---|
public InputStream toInputStream()
public OutputStream toOutputStream()
public void setText(String text) throws IOException
Property: text
Description: The buffer as a text property. Either set the buffer contents from text or get the buffer contents as text.
Required: No.
text
-
IOException
public String getText()
public String[] getLines()
public void setLines(String[] lines)
Property: lines
Description: The buffer contents as an array of lines. Either set the contents to be the array or read the contents of the buffer as an array.
Required: No.
public void initialised()
ArooaLifeAware
initialised
in interface ArooaLifeAware
public void configured()
ArooaLifeAware
configured
in interface ArooaLifeAware
public void destroy()
ArooaLifeAware
destroy
in interface ArooaLifeAware
public String toString()
toString
in class Object
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |