public class JCalRawReader extends Object implements Closeable
Modifier and Type | Class and Description |
---|---|
static interface |
JCalRawReader.JCalDataStreamListener
Handles the iCalendar data as it is read off the data stream.
|
Constructor and Description |
---|
JCalRawReader(JsonParser parser,
boolean strict) |
JCalRawReader(Reader reader) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the underlying
Reader object. |
boolean |
eof()
Determines whether the end of the data stream has been reached.
|
int |
getLineNum()
Gets the current line number.
|
void |
readNext(JCalRawReader.JCalDataStreamListener listener)
Reads the next iCalendar object from the jCal data stream.
|
public JCalRawReader(Reader reader)
reader
- the reader to wrappublic JCalRawReader(JsonParser parser, boolean strict)
parser
- the parser to read fromstrict
- true if the parser's current token is expected to be
positioned at the start of a jCard, false if not. If this is true, and
the parser is not positioned at the beginning of a jCard, a
JCalParseException
will be thrown. If this if false, the parser
will consume input until it reaches the beginning of a jCard.public int getLineNum()
public void readNext(JCalRawReader.JCalDataStreamListener listener) throws IOException
listener
- handles the iCalendar data as it is read off the wireJCalParseException
- if the jCal syntax is incorrect (the JSON
syntax may be valid, but it is not in the correct jCal format).JsonParseException
- if the JSON syntax is incorrectIOException
- if there is a problem reading from the data streampublic boolean eof()
public void close() throws IOException
Reader
object.close
in interface Closeable
close
in interface AutoCloseable
IOException
Copyright © 2013–2024 Michael Angstadt. All rights reserved.