|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbiweekly.io.text.ICalRawReader
public class ICalRawReader
Parses an iCalendar data stream.
Nested Class Summary | |
---|---|
static interface |
ICalRawReader.ICalDataStreamListener
Handles the iCalendar data as it is read off the data stream. |
static class |
ICalRawReader.StopReadingException
Instructs an ICalRawReader to stop reading from the data stream
when thrown from an ICalRawReader.ICalDataStreamListener implementation. |
Constructor Summary | |
---|---|
ICalRawReader(Reader reader)
Creates a new reader. |
Method Summary | |
---|---|
void |
close()
Closes the underlying Reader object. |
boolean |
eof()
Determines whether the end of the data stream has been reached. |
int |
getLineNum()
Gets the line number of the last line that was read. |
boolean |
isCaretDecodingEnabled()
Gets whether the reader will decode parameter values that use circumflex accent encoding (enabled by default). |
void |
setCaretDecodingEnabled(boolean enable)
Sets whether the reader will decode parameter values that use circumflex accent encoding (enabled by default). |
void |
start(ICalRawReader.ICalDataStreamListener listener)
Starts or continues reading from the iCalendar data stream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ICalRawReader(Reader reader)
reader
- the reader to the data streamMethod Detail |
---|
public int getLineNum()
public void start(ICalRawReader.ICalDataStreamListener listener) throws IOException
listener
- handles the iCalendar data as it is read off the wire
IOException
- if there is an I/O problempublic boolean isCaretDecodingEnabled()
Gets whether the reader will decode parameter values that use circumflex accent encoding (enabled by default). This escaping mechanism allows newlines and double quotes to be included in parameter values.
Raw Character | Encoded Character |
---|---|
" |
^' |
newline | ^n |
^ |
^^ |
Example:
GEO;X-ADDRESS="Pittsburgh Pirates^n115 Federal St^nPitt sburgh, PA 15212":40.446816;80.00566
public void setCaretDecodingEnabled(boolean enable)
Sets whether the reader will decode parameter values that use circumflex accent encoding (enabled by default). This escaping mechanism allows newlines and double quotes to be included in parameter values.
Raw Character | Encoded Character |
---|---|
" |
^' |
newline | ^n |
^ |
^^ |
Example:
GEO;X-ADDRESS="Pittsburgh Pirates^n115 Federal St^nPitt sburgh, PA 15212":geo:40.446816,-80.00566
enable
- true to use circumflex accent decoding, false not topublic boolean eof()
public void close() throws IOException
Reader
object.
close
in interface Closeable
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |