public static class Ezvcard.WriterChainXml
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
org.w3c.dom.Document |
dom()
Generates an XML document object model (DOM) containing the xCards.
|
java.lang.String |
go()
Writes the xCards to a string.
|
void |
go(java.io.File file)
Writes the xCards to a file.
|
void |
go(java.io.OutputStream out)
Writes the xCards to an output stream.
|
void |
go(java.io.Writer writer)
Writes the xCards to a writer.
|
Ezvcard.WriterChainXml |
indent(int indent)
Sets the number of indent spaces to use for pretty-printing.
|
Ezvcard.WriterChainXml |
prodId(boolean include)
Sets whether or not to add a PRODID property to each vCard, saying
that the vCard was generated by this library.
|
Ezvcard.WriterChainXml |
register(VCardPropertyScribe<? extends VCardProperty> scribe)
Registers a property scribe.
|
Ezvcard.WriterChainXml |
versionStrict(boolean versionStrict)
Sets whether properties that do not support xCard (vCard version 4.0)
will be excluded from the written vCard.
|
public Ezvcard.WriterChainXml prodId(boolean include)
include
- true to add PRODID (default), false not topublic Ezvcard.WriterChainXml indent(int indent)
indent
- the number of spaces in the indent stringpublic Ezvcard.WriterChainXml versionStrict(boolean versionStrict)
versionStrict
- true to exclude properties that do not support
xCard, false to include them anyway (defaults to true)public Ezvcard.WriterChainXml register(VCardPropertyScribe<? extends VCardProperty> scribe)
scribe
- the scribe to registerpublic java.lang.String go()
public void go(java.io.OutputStream out) throws javax.xml.transform.TransformerException
out
- the output stream to write tojavax.xml.transform.TransformerException
- if there's a problem writing to the
output streampublic void go(java.io.File file) throws java.io.IOException, javax.xml.transform.TransformerException
file
- the file to write tojava.io.IOException
- if the file can't be openedjavax.xml.transform.TransformerException
- if there's a problem writing to the filepublic void go(java.io.Writer writer) throws javax.xml.transform.TransformerException
writer
- the writer to write tojavax.xml.transform.TransformerException
- if there's a problem writing to the
writerpublic org.w3c.dom.Document dom()
This software is published under the BSD license. Copyright © 2003-${build.year}, CRIXP AG, Switzerland, All rights reserved. Use is subject to license terms.