public abstract class StreamReader extends Object implements Closeable
Modifier and Type | Field and Description |
---|---|
protected ParseContext |
context |
protected ScribeIndex |
index |
protected List<ParseWarning> |
warnings |
Constructor and Description |
---|
StreamReader() |
Modifier and Type | Method and Description |
---|---|
protected abstract ICalendar |
_readNext()
Reads the next iCalendar object from the data stream.
|
ScribeIndex |
getScribeIndex()
Gets the object that manages the component/property scribes.
|
List<ParseWarning> |
getWarnings()
Gets the warnings from the last iCalendar object that was read.
|
List<ICalendar> |
readAll()
Reads all iCalendar objects from the data stream.
|
ICalendar |
readNext()
Reads the next iCalendar object from the data stream.
|
void |
registerScribe(ICalComponentScribe<? extends ICalComponent> scribe)
Registers an experimental component scribe.
|
void |
registerScribe(ICalPropertyScribe<? extends ICalProperty> scribe)
Registers an experimental property scribe.
|
void |
setScribeIndex(ScribeIndex index)
Sets the object that manages the component/property scribes.
|
protected final List<ParseWarning> warnings
protected ScribeIndex index
protected ParseContext context
public StreamReader()
public void registerScribe(ICalPropertyScribe<? extends ICalProperty> scribe)
Registers an experimental property scribe. Can also be used to override the scribe of a standard property (such as DTSTART). Calling this method is the same as calling:
getScribeIndex().register(scribe)
.
scribe
- the scribe to registerpublic void registerScribe(ICalComponentScribe<? extends ICalComponent> scribe)
Registers an experimental component scribe. Can also be used to override the scribe of a standard component (such as VEVENT). Calling this method is the same as calling:
getScribeIndex().register(scribe)
.
scribe
- the scribe to registerpublic ScribeIndex getScribeIndex()
public void setScribeIndex(ScribeIndex index)
index
- the scribe indexpublic List<ParseWarning> getWarnings()
public List<ICalendar> readAll() throws IOException
IOException
- if there's a problem reading from the streampublic ICalendar readNext() throws IOException
IOException
- if there's a problem reading from the streamprotected abstract ICalendar _readNext() throws IOException
IOException
- if there's a problem reading from the streamCopyright © 2013-2017 Michael Angstadt. All Rights Reserved.