public class ICalRawReader extends Object implements Closeable
Constructor and Description |
---|
ICalRawReader(Reader reader)
Creates a new reader.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the underlying
Reader object. |
Charset |
getEncoding()
Gets the character encoding of the reader.
|
int |
getLineNum()
Gets the line number of the last line that was read.
|
ICalVersion |
getVersion()
Gets the iCalendar version that the reader is currently parsing with.
|
boolean |
isCaretDecodingEnabled()
Gets whether the reader will decode parameter values that use circumflex
accent encoding (enabled by default).
|
ICalRawLine |
readLine()
Parses the next line of the iCalendar file.
|
void |
setCaretDecodingEnabled(boolean enable)
Sets whether the reader will decode parameter values that use circumflex
accent encoding (enabled by default).
|
public ICalRawReader(Reader reader)
reader
- the reader to the data streampublic int getLineNum()
public ICalVersion getVersion()
public ICalRawLine readLine() throws IOException
ICalParseException
- if a line cannot be parsedIOException
- if there's a problem reading from the input streampublic 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 Charset getEncoding()
public void close() throws IOException
Reader
object.close
in interface Closeable
close
in interface AutoCloseable
IOException
Copyright © 2013-2015 Michael Angstadt. All Rights Reserved.