|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectezvcard.io.text.VCardRawReader
public class VCardRawReader
Parses a vCard data stream.
Nested Class Summary | |
---|---|
static class |
VCardRawReader.StopReadingException
Instructs a VCardRawReader to stop reading from the data stream
when thrown from a VCardRawReader.VCardDataStreamListener implementation. |
static interface |
VCardRawReader.VCardDataStreamListener
Handles the vCard data as it is read off the data stream. |
Constructor Summary | |
---|---|
VCardRawReader(Reader reader)
Creates a new reader. |
Method Summary | |
---|---|
void |
close()
Closes the underlying Reader object. |
boolean |
eof()
Determines whether the end of the data stream has been reached. |
Charset |
getEncoding()
Gets the character encoding of the reader. |
int |
getLineNum()
Gets the line number of the last line that was read. |
boolean |
isCaretDecodingEnabled()
Gets whether the reader will decode parameter values that use circumflex accent encoding (enabled by default). |
void |
setCaretDecodingEnabled(boolean enable)
Sets whether the reader will decode parameter values that use circumflex accent encoding (enabled by default). |
void |
start(VCardRawReader.VCardDataStreamListener listener)
Starts or continues reading from the vCard data stream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public VCardRawReader(Reader reader)
reader
- the reader to the data streamMethod Detail |
---|
public int getLineNum()
public void start(VCardRawReader.VCardDataStreamListener listener) throws IOException
listener
- handles the vCard data as it is read off the wire
IOException
- if there is an I/O problempublic 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 boolean eof()
public Charset getEncoding()
public 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 |