ezvcard
Class Ezvcard.WriterChainTextMulti

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

public static class Ezvcard.WriterChainTextMulti
extends Object

Convenience chainer class for writing plain text vCards


Method Summary
 Ezvcard.WriterChainTextMulti caretEncoding(boolean enable)
          Sets whether the writer will use circumflex accent encoding for vCard 3.0 and 4.0 parameter values (disabled by default).
 String go()
          Writes the vCards to a string.
 void go(File file)
          Writes the vCards to a file.
 void go(OutputStream out)
          Writes the vCards to an output stream.
 void go(Writer writer)
          Writes the vCards to a writer.
 Ezvcard.WriterChainTextMulti prodId(boolean include)
          Sets whether or not to add a PRODID type to each vCard, saying that the vCard was generated by this library.
 Ezvcard.WriterChainTextMulti version(VCardVersion version)
           Sets the version that all the vCards will be marshalled to.
 Ezvcard.WriterChainTextMulti warnings(List<List<String>> warnings)
          Provides a list object that any marshal 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

version

public Ezvcard.WriterChainTextMulti version(VCardVersion version)

Sets the version that all the vCards will be marshalled to. The version that is attached to each individual VCard object will be ignored.

If no version is passed into this method, the writer will look at the version attached to each individual VCard object and marshal it to that version. And if a VCard object has no version attached to it, then it will be marshalled to version 3.0.

Parameters:
version - the version to marshal the vCards to
Returns:
this

prodId

public Ezvcard.WriterChainTextMulti prodId(boolean include)
Sets whether or not to add a PRODID type to each vCard, saying that the vCard was generated by this library. For 2.1 vCards, the extended type X-PRODID is used, since PRODID is not supported by that version.

Parameters:
include - true to add PRODID (default), false not to
Returns:
this

caretEncoding

public Ezvcard.WriterChainTextMulti caretEncoding(boolean enable)
Sets whether the writer will use circumflex accent encoding for vCard 3.0 and 4.0 parameter values (disabled by default).

Parameters:
enable - true to use circumflex accent encoding, false not to
See Also:
VCardWriter.setCaretEncodingEnabled(boolean), RFC 6868

warnings

public Ezvcard.WriterChainTextMulti warnings(List<List<String>> warnings)
Provides a list object that any marshal warnings will be put into. Warnings usually occur when there is a property in the VCard that is not supported by the version to which the vCard is being marshalled.

Parameters:
warnings - the list object that will be populated with the warnings of each marshalled vCard. Each element of the list is the list of warnings for one of the marshalled 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

go

public String go()
Writes the vCards to a string.

Returns:
the vCard string

go

public void go(OutputStream out)
        throws IOException
Writes the vCards to an output stream.

Parameters:
out - the output stream to write to
Throws:
IOException - if there's a problem writing to the output stream

go

public void go(File file)
        throws IOException
Writes the vCards to a file.

Parameters:
file - the file to write to
Throws:
IOException - if there's a problem writing to the file

go

public void go(Writer writer)
        throws IOException
Writes the vCards to a writer.

Parameters:
writer - the writer to write to
Throws:
IOException - if there's a problem writing to the writer


Copyright © 2012-2013. All Rights Reserved.