|
Service Activator Toolkit
Version 1.0.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
The ILineWriter interface defines the API for line-oriented
writing of an OutputStream. An instance of
ILineWriter can be created using the FactoryUtility
singleton.
OutputStream stream = ...
FactoryUtility utility = FactoryUtility.getInstance();
try {
ILineWriter writer = null;
try {
writer = utility.createLineWriter(stream);
...
} finally {
if (writer != null) {
writer.close();
}
}
} catch (IOException exception) {
...
}
Lines are written to the stream using either write(String) or
writeLine(String). The method newLine() is used
to add a new line to the stream. Flushing the stream is done using the
method flush(), although this is implied when the
close() method is called.
FactoryUtility| Method Summary | |
void |
close()
Close the receiver. |
void |
flush()
Flush the receiver. |
void |
newLine()
Write a new line. |
void |
write(String line)
Write a line of text. |
void |
writeLine(String line)
Write a line of text, followed by a new line. |
| Method Detail |
public void close()
throws IOException
IOException
public void flush()
throws IOException
IOException
public void newLine()
throws IOException
IOException
public void write(String line)
throws IOException
line - The line of text to write.
IOException
public void writeLine(String line)
throws IOException
line - The line of text to write.
IOException
|
Service Activator Toolkit
Version 1.0.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright © 2001, 2007 IBM Corporation and others. All Rights Reserved.