ezvcard
Class Ezvcard.WriterChainXmlMulti

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

public static class Ezvcard.WriterChainXmlMulti
extends Object

Convenience chainer class for writing XML vCards (xCard).


Method Summary
 Document dom()
          Generates an XML document object model (DOM) containing the xCards.
 String go()
          Writes the xCards to a string.
 void go(File file)
          Writes the xCards to a file.
 void go(OutputStream out)
          Writes the xCards to an output stream.
 void go(Writer writer)
          Writes the xCards to a writer.
 Ezvcard.WriterChainXmlMulti indent(int indent)
          Sets the number of indent spaces to use for pretty-printing.
 Ezvcard.WriterChainXmlMulti 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.WriterChainXmlMulti 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

prodId

public Ezvcard.WriterChainXmlMulti prodId(boolean include)
Sets whether or not to add a PRODID type to each vCard, saying that the vCard was generated by this library.

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

indent

public Ezvcard.WriterChainXmlMulti indent(int indent)
Sets the number of indent spaces to use for pretty-printing. If not set, then the XML will not be pretty-printed.

Parameters:
indent - the number of spaces in the indent string
Returns:
this

warnings

public Ezvcard.WriterChainXmlMulti 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 xCards to a string.

Returns:
the XML document

go

public void go(OutputStream out)
        throws TransformerException
Writes the xCards to an output stream.

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

go

public void go(File file)
        throws IOException,
               TransformerException
Writes the xCards to a file.

Parameters:
file - the file to write to
Throws:
IOException - if the file can't be opened
TransformerException - if there's a problem writing to the file

go

public void go(Writer writer)
        throws TransformerException
Writes the xCards to a writer.

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

dom

public Document dom()
Generates an XML document object model (DOM) containing the xCards.

Returns:
the DOM


Copyright © 2012-2013. All Rights Reserved.