|
Service Activator Toolkit
Version 1.1.0 (20081206) |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface ILineWriter
The ILineWriter interface defines the API for line-oriented
writing of an OutputStream. An instance of
ILineWriter can be created using the FactoryUtility
singleton.
FactoryUtility utility = FactoryUtility.getInstance();
OutputStream stream = ...
try {
ILineWriter writer = utility.createLineWriter(stream);
try {
...
} finally {
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 |
|---|
void close()
throws IOException
IOException
void flush()
throws IOException
IOException
void newLine()
throws IOException
IOException
void write(String line)
throws IOException
line - The line of text to write.
IOException
void writeLine(String line)
throws IOException
line - The line of text to write.
IOException
|
Service Activator Toolkit
Version 1.1.0 (20081206) |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright © 2001, 2008 IBM Corporation and others. All Rights Reserved.