|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectezvcard.Ezvcard.WriterChainJson
public static class Ezvcard.WriterChainJson
Chainer class for writing JSON-encoded vCards (jCard).
Ezvcard.writeJson(Collection)
,
Ezvcard.writeJson(VCard...)
Method Summary | |
---|---|
String |
go()
Writes the jCards to a string. |
void |
go(File file)
Writes the jCards to a file. |
void |
go(OutputStream out)
Writes the jCards to an output stream. |
void |
go(Writer writer)
Writes the jCards to a writer. |
Ezvcard.WriterChainJson |
indent(boolean indent)
Sets whether or not to pretty-print the JSON. |
Ezvcard.WriterChainJson |
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.WriterChainJson |
register(VCardPropertyScribe<? extends VCardProperty> scribe)
Registers a property scribe. |
Ezvcard.WriterChainJson |
versionStrict(boolean versionStrict)
Sets whether properties that do not support jCard (vCard version 4.0) will be excluded from the written vCard. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public Ezvcard.WriterChainJson prodId(boolean include)
include
- true to add PRODID (default), false not to
public Ezvcard.WriterChainJson indent(boolean indent)
indent
- true to pretty-print it, false not to (defaults to
false)
public Ezvcard.WriterChainJson versionStrict(boolean versionStrict)
versionStrict
- true to exclude properties that do not support
jCard, false to include them anyway (defaults to true)
public Ezvcard.WriterChainJson register(VCardPropertyScribe<? extends VCardProperty> scribe)
scribe
- the scribe to register
public String go()
public void go(OutputStream out) throws IOException
out
- the output stream to write to
IOException
- if there's a problem writing to the output streampublic void go(File file) throws IOException
file
- the file to write to
IOException
- if there's a problem writing to the filepublic void go(Writer writer) throws IOException
writer
- the writer to write to
IOException
- if there's a problem writing to the writer
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |