|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbiweekly.io.text.ICalReader
public class ICalReader
Parses ICalendar
objects from an iCalendar data stream.
Example:
InputStream in = ... ICalReader icalReader = new ICalReader(in); ICalendar ical; while ((ical = icalReader.readNext()) != null){ ... } icalReader.close();
Constructor Summary | |
---|---|
ICalReader(File file)
Creates a reader that parses iCalendar objects from a file. |
|
ICalReader(InputStream in)
Creates a reader that parses iCalendar objects from an input stream. |
|
ICalReader(Reader reader)
Creates a reader that parses iCalendar objects from a reader. |
|
ICalReader(String string)
Creates a reader that parses iCalendar objects from a string. |
Method Summary | |
---|---|
void |
close()
Closes the underlying Reader object. |
ICalMarshallerRegistrar |
getRegistrar()
Gets the object that manages the component/property marshaller objects. |
List<String> |
getWarnings()
Gets the warnings from the last iCalendar object that was unmarshalled. |
boolean |
isCaretDecodingEnabled()
Gets whether the reader will decode parameter values that use circumflex accent encoding (enabled by default). |
ICalendar |
readNext()
Reads the next iCalendar object. |
void |
registerMarshaller(ICalComponentMarshaller<? extends ICalComponent> marshaller)
Registers an experimental component marshaller. |
void |
registerMarshaller(ICalPropertyMarshaller<? extends ICalProperty> marshaller)
Registers an experimental property marshaller. |
void |
setCaretDecodingEnabled(boolean enable)
Sets whether the reader will decode parameter values that use circumflex accent encoding (enabled by default). |
void |
setRegistrar(ICalMarshallerRegistrar registrar)
Sets the object that manages the component/property marshaller objects. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ICalReader(String string)
string
- the stringpublic ICalReader(InputStream in)
in
- the input streampublic ICalReader(File file) throws FileNotFoundException
file
- the file
FileNotFoundException
- if the file doesn't existpublic ICalReader(Reader reader)
reader
- the readerMethod Detail |
---|
public boolean isCaretDecodingEnabled()
ICalRawReader.isCaretDecodingEnabled()
public void setCaretDecodingEnabled(boolean enable)
enable
- true to use circumflex accent decoding, false not toICalRawReader.setCaretDecodingEnabled(boolean)
public void registerMarshaller(ICalPropertyMarshaller<? extends ICalProperty> marshaller)
Registers an experimental property marshaller. Can also be used to override the marshaller of a standard property (such as DTSTART). Calling this method is the same as calling:
getRegistrar().register(marshaller)
.
marshaller
- the marshaller to registerpublic void registerMarshaller(ICalComponentMarshaller<? extends ICalComponent> marshaller)
Registers an experimental component marshaller. Can also be used to override the marshaller of a standard component (such as VEVENT). Calling this method is the same as calling:
getRegistrar().register(marshaller)
.
marshaller
- the marshaller to registerpublic ICalMarshallerRegistrar getRegistrar()
public void setRegistrar(ICalMarshallerRegistrar registrar)
registrar
- the marshaller registrarpublic List<String> getWarnings()
public ICalendar readNext() throws IOException
IOException
- if there's a problem reading from the streampublic 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 |