|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectezvcard.io.HCardPage
public class HCardPage
Writes vCards to an HTML page (hCard format).
| Nested Class Summary | |
|---|---|
static class |
HCardPage.DataUriGenerator
Generates data URIs for the freemarker template. |
| Field Summary | |
|---|---|
protected static Template |
template
|
protected List<VCard> |
vcards
|
| Constructor Summary | |
|---|---|
HCardPage()
|
|
| Method Summary | |
|---|---|
void |
addVCard(VCard vcard)
Adds a vCard to the HTML page. |
protected PhotoType |
readImage(String name,
ImageTypeParameter mediaType)
Reads an image from the classpath. |
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 |
| Field Detail |
|---|
protected static final Template template
protected final List<VCard> vcards
| Constructor Detail |
|---|
public HCardPage()
| Method Detail |
|---|
public void addVCard(VCard vcard)
vcard - the vCard to add
public String write()
throws TemplateException
TemplateException - if there's a problem with the freemarker
template
public void write(OutputStream out)
throws IOException,
TemplateException
out - the output stream
IOException - if there's a problem writing to the output stream
TemplateException - if there's a problem with the freemarker
template
public void write(File file)
throws IOException,
TemplateException
file - the file
IOException - if there's a problem writing to the file
TemplateException - if there's a problem with the freemarker
template
public void write(Writer writer)
throws IOException,
TemplateException
writer - the writer
IOException - if there's a problem writing to the writer
TemplateException - if there's a problem with the freemarker
template
protected PhotoType readImage(String name,
ImageTypeParameter mediaType)
throws IOException
name - the file name, relative to this classmediaType - the media type of the image
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||