public static class Ezvcard.WriterChainText extends Object
Ezvcard.write(Collection)
,
Ezvcard.write(VCard...)
Modifier and Type | Method and Description |
---|---|
Ezvcard.WriterChainText |
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(File file,
boolean append)
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.WriterChainText |
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.WriterChainText |
register(VCardPropertyScribe<? extends VCardProperty> scribe)
Registers a property scribe.
|
Ezvcard.WriterChainText |
version(VCardVersion version)
Sets the version that all the vCards will be marshalled to.
|
Ezvcard.WriterChainText |
versionStrict(boolean versionStrict)
Sets whether properties that do not support the target version will
be excluded from the written vCard.
|
public Ezvcard.WriterChainText 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.
version
- the version to marshal the vCards topublic Ezvcard.WriterChainText prodId(boolean include)
include
- true to add PRODID (default), false not topublic Ezvcard.WriterChainText caretEncoding(boolean enable)
enable
- true to use circumflex accent encoding, false not toVCardWriter.setCaretEncodingEnabled(boolean)
,
RFC 6868public Ezvcard.WriterChainText versionStrict(boolean versionStrict)
versionStrict
- true to exclude properties that do not support
the target version, false to include them anyway (defaults to true)public Ezvcard.WriterChainText register(VCardPropertyScribe<? extends VCardProperty> scribe)
scribe
- the scribe to registerpublic String go()
public void go(OutputStream out) throws IOException
out
- the output stream to write toIOException
- if there's a problem writing to the output streampublic void go(File file) throws IOException
file
- the file to write toIOException
- if there's a problem writing to the filepublic void go(File file, boolean append) throws IOException
file
- the file to write toappend
- true to append onto the end of the file, false to
overwrite itIOException
- if there's a problem writing to the filepublic void go(Writer writer) throws IOException
writer
- the writer to write toIOException
- if there's a problem writing to the writerThis software is published under the BSD license. Copyright © 2003-${build.year}, CRIXP AG, Switzerland, All rights reserved. Use is subject to license terms.