ezvcard
Class Ezvcard.ParserChainTextString

java.lang.Object
  extended by ezvcard.Ezvcard.ParserChainTextString
Enclosing class:
Ezvcard

public static class Ezvcard.ParserChainTextString
extends Object

Chainer class for parsing plain text vCards.

See Also:
Ezvcard.parse(String)

Method Summary
 List<VCard> all()
          Reads all vCards from the stream.
 Ezvcard.ParserChainTextString caretDecoding(boolean enable)
          Sets whether the reader will decode characters in parameter values that use circumflex accent encoding (enabled by default).
 T defaultQuotedPrintableCharset(Charset charset)
           Sets the character set to use when decoding quoted-printable values if the property has no CHARSET parameter, or if the CHARSET parameter is not a valid character set.
 VCard first()
          Reads the first vCard from the stream.
 Ezvcard.ParserChainTextString register(VCardPropertyScribe<? extends VCardProperty> scribe)
          Registers a property scribe.
 Ezvcard.ParserChainTextString warnings(List<List<String>> warnings)
          Provides a list object that any unmarshal warnings will be put into.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

register

public Ezvcard.ParserChainTextString register(VCardPropertyScribe<? extends VCardProperty> scribe)
Registers a property scribe.

Parameters:
scribe - the scribe
Returns:
this

warnings

public Ezvcard.ParserChainTextString warnings(List<List<String>> warnings)
Provides a list object that any unmarshal warnings will be put into.

Parameters:
warnings - the list object that will be populated with the warnings of each unmarshalled vCard. Each element of the list is the list of warnings for one of the unmarshalled vCards. Therefore, the size of this list will be equal to the number of parsed vCards. If a vCard does not have any warnings, then its warning list will be empty.
Returns:
this

caretDecoding

public Ezvcard.ParserChainTextString caretDecoding(boolean enable)
Sets whether the reader will decode characters in parameter values that use circumflex accent encoding (enabled by default).

Parameters:
enable - true to use circumflex accent decoding, false not to
Returns:
this
See Also:
VCardReader.setCaretDecodingEnabled(boolean), RFC 6868

first

public VCard first()
Reads the first vCard from the stream.

Returns:
the vCard or null if there are no vCards

all

public List<VCard> all()
Reads all vCards from the stream.

Returns:
the parsed vCards

defaultQuotedPrintableCharset

public T defaultQuotedPrintableCharset(Charset charset)

Sets the character set to use when decoding quoted-printable values if the property has no CHARSET parameter, or if the CHARSET parameter is not a valid character set.

By default, the Reader's character encoding will be used. If the Reader has no character encoding, then the system's default character encoding will be used.

Parameters:
charset - the character set
Returns:
this


Copyright © 2012-2014 Michael Angstadt. All Rights Reserved.