|
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 ILineReader
The ILineReader
interface defines the API for line-oriented
reading of an InputStream
. An instance of
ILineReader
can be created using the FactoryUtility
singleton.
FactoryUtility utility = FactoryUtility.getInstance(); InputStream stream = ... try { ILineReader reader = utility.createLineReader(stream); try { ... } finally { reader.close(); } } catch (IOException exception) { ... }While a single line may be read using the
readLine()
method,
reading multiple lines is typically done by calling the lines()
method that returns an Enumeration
.
Enumeration lines = reader.lines(); while (lines.hasMoreElements() == true) { String line = (String) lines.nextElement(); ... }The nested
IAdvisor
interface defines the advice that can be
given an ILineReader
as each line is read.
ILineReader.IAdvisor
,
FactoryUtility
Nested Class Summary | |
---|---|
static interface |
ILineReader.IAdvisor
The IAdvisor interface defines the advice that can be given
to an ILineReader as each line is read. |
Method Summary | |
---|---|
void |
close()
Close the receiver. |
Enumeration |
lines()
Answers an Enumeration for reading lines. |
String |
readLine()
Reads and answers a single line. |
Method Detail |
---|
void close() throws IOException
IOException
Enumeration lines()
Enumeration
for reading lines.
Enumeration
used for reading the lines from the
InputStream
.String readLine() throws IOException
String
containing single line from the source
InputStream
.
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.