edu.cmu.andrew.icalendar
Class VCalendarParser
java.lang.Object
|
+--edu.cmu.andrew.icalendar.VCalendarParser
- public class VCalendarParser
- extends Object
Turn streams into ICalendarObjects.
Field Summary |
(package private) int |
nextchar
|
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
nextchar
int nextchar
VCalendarParser
private VCalendarParser()
peekChar
private static int peekChar(BufferedReader r)
throws IOException
checkString
private static boolean checkString(BufferedReader r,
String s)
throws IOException
eatString
private static boolean eatString(BufferedReader r,
String s)
throws IOException
- Consumes the string s from the BufferedReader. Consumes no input if s does not match
the start of the stream.
- Parameters:
r
- s
- - Returns:
- true if the input was consumed
- Throws:
IOException
-
parseParameter
private Parameter parseParameter(BufferedReader r)
throws ICalendarParseException,
IOException
parseProperty
private Property parseProperty(BufferedReader r)
throws ICalendarParseException,
IOException,
BadComponentException
- given a stream at the start of a property line, parse the property.
parseComponent
private Component parseComponent(BufferedReader r)
throws ICalendarParseException,
BadComponentException,
IOException
- given a stream at "BEGIN:", produce an object of
that component
parseArbitraryComponent
public static Component parseArbitraryComponent(BufferedReader r)
throws ICalendarParseException,
BadComponentException
- Constructs any valid iCalendar component from the input stream.
- Parameters:
r
- the input stream- Returns:
- a newly constructed component
- Throws:
ICalendarParseException
- BadComponentException
-
parse
public static VCalendar parse(BufferedReader r)
throws ICalendarParseException,
BadComponentException
- Constructs a VCalendar from the input stream
- Parameters:
s
- the input stream- Returns:
- a newly created VCalendar object
- Throws:
ICalendarParseException
- when the stream doesn't have
ICalendar syntaxBadComponentException
- when the stream contains a
component that violates an invariant
parsePropertyList
public static Map parsePropertyList(Map propmap,
BufferedReader r)
throws ICalendarParseException,
BadComponentException