|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectezvcard.io.VCardReader
public class VCardReader
Unmarshals vCards into VCard
objects.
Constructor Summary | |
---|---|
VCardReader(File file)
|
|
VCardReader(InputStream in)
|
|
VCardReader(Reader reader)
|
|
VCardReader(String str)
|
Method Summary | |
---|---|
void |
close()
Closes the underlying Reader object. |
CompatibilityMode |
getCompatibilityMode()
Deprecated. |
List<String> |
getWarnings()
Gets the warnings from the last vCard that was unmarshalled. |
boolean |
isCaretDecodingEnabled()
Gets whether the reader will decode characters in parameter values that use circumflex accent encoding. |
VCard |
readNext()
Reads the next vCard. |
void |
registerExtendedType(Class<? extends VCardType> clazz)
Registers an extended type class. |
void |
setCaretDecodingEnabled(boolean enable)
Sets whether the reader will decode characters in parameter values that use circumflex accent encoding. |
void |
setCompatibilityMode(CompatibilityMode compatibilityMode)
Deprecated. |
void |
unregisterExtendedType(Class<? extends VCardType> clazz)
Removes an extended type class that was previously registered. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public VCardReader(String str)
str
- the string to read the vCards frompublic VCardReader(InputStream in)
in
- the input stream to read the vCards frompublic VCardReader(File file) throws FileNotFoundException
file
- the file to read the vCards from
FileNotFoundException
- if the file doesn't existpublic VCardReader(Reader reader)
reader
- the reader to read the vCards fromMethod Detail |
---|
public boolean isCaretDecodingEnabled()
Gets whether the reader will decode characters in parameter values that use circumflex accent encoding. This escaping mechanism allows for newlines and double quotes to be included in parameter values.
Raw | Encoded |
---|---|
" |
^' |
newline | ^n |
^ |
^^ |
This setting is enabled by default and is only used with 3.0 and 4.0 vCards.
Example:
GEO;X-ADDRESS="Pittsburgh Pirates^n115 Federal St^nPitt sburgh, PA 15212":geo:40.446816,-80.00566
public void setCaretDecodingEnabled(boolean enable)
Sets whether the reader will decode characters in parameter values that use circumflex accent encoding. This escaping mechanism allows for newlines and double quotes to be included in parameter values.
Raw | Encoded |
---|---|
" |
^' |
newline | ^n |
^ |
^^ |
This setting is enabled by default and is only used with 3.0 and 4.0 vCards.
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 to@Deprecated public CompatibilityMode getCompatibilityMode()
@Deprecated public void setCompatibilityMode(CompatibilityMode compatibilityMode)
compatibilityMode
- the compatibility modepublic void registerExtendedType(Class<? extends VCardType> clazz)
IParser
registerExtendedType
in interface IParser
clazz
- the extended type class to register (MUST have a public,
no-arg constructor)public void unregisterExtendedType(Class<? extends VCardType> clazz)
IParser
unregisterExtendedType
in interface IParser
clazz
- the extended type class to remove (MUST have a public,
no-arg constructor)public List<String> getWarnings()
IParser
getWarnings
in interface IParser
public VCard readNext() throws IOException
IParser
readNext
in interface IParser
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 |