|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectezvcard.io.html.HCardPage
public class HCardPage
Writes VCard objects to a templated HTML page (hCard format).
Example:
VCard vcard1 = ...
VCard vcard2 = ...
HCardPage page = new HCardPage();
page.add(vcard1);
page.add(vcard2);
File file = new File("hcard.html");
page.write(file);
| Nested Class Summary | |
|---|---|
static class |
HCardPage.DataUriGenerator
Generates data URIs for the freemarker template. |
| Constructor Summary | |
|---|---|
HCardPage()
|
|
| Method Summary | |
|---|---|
void |
add(VCard vcard)
Adds a vCard to the HTML page. |
String |
write()
Writes the HTML document to a string. |
void |
write(File file)
Writes the HTML document to a file. |
void |
write(OutputStream out)
Writes the HTML document to an output stream. |
void |
write(Writer writer)
Writes the HTML document to a writer. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HCardPage()
| Method Detail |
|---|
public void add(VCard vcard)
vcard - the vCard to addpublic String write()
public void write(OutputStream out)
throws IOException
out - the output stream
IOException - if there's a problem writing to the output stream
public void write(File file)
throws IOException
file - the file
IOException - if there's a problem writing to the file
public void write(Writer writer)
throws IOException
writer - the writer
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 | |||||||||