|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.allcolor.yahp.converter.CYaHPConverter
public final class CYaHPConverter
This class convert an HTML input to a PDF.
| Field Summary | |
|---|---|
private static int |
countInstance
Number of active instance |
private static CMutex |
countMutex
an handle to a mutex object for thread safety |
private static java.util.List |
fileToDeleteOnDestroy
|
private CMutex |
mutex
an handle to a mutex object for thread safety |
private java.util.Map |
transformers
an handle to the known transformers |
| Constructor Summary | |
|---|---|
CYaHPConverter()
Creates a new CYaHPConverter object. |
|
| Method Summary | |
|---|---|
void |
convertToPdf(java.lang.String content,
IHtmlToPdfTransformer.PageSize size,
java.util.List hf,
java.lang.String furlForBase,
java.io.OutputStream out,
java.util.Map fproperties)
Convert the document in content in a PDF file. |
void |
convertToPdf(java.net.URL url,
IHtmlToPdfTransformer.PageSize size,
java.util.List hf,
java.io.OutputStream out,
java.util.Map fproperties)
Convert the document pointed by url in a PDF file. |
static void |
destroy()
Delete the jar file from the temp directory Destroy the classloader |
protected void |
finalize()
If instance count fall to 0, Delete the jar file from the temp directory, Destroy the classloader by calling the destroy method |
private IHtmlToPdfTransformer |
getTransformer(java.util.Map properties)
Get a transformer. |
private void |
init()
initialize the classloader, and the transformer |
static void |
registerFileToDeleteOnDestroy(java.io.File f)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final CMutex countMutex
private static int countInstance
private final CMutex mutex
private java.util.Map transformers
private static java.util.List fileToDeleteOnDestroy
| Constructor Detail |
|---|
public CYaHPConverter()
| Method Detail |
|---|
public static void destroy()
public static void registerFileToDeleteOnDestroy(java.io.File f)
public final void convertToPdf(java.net.URL url,
IHtmlToPdfTransformer.PageSize size,
java.util.List hf,
java.io.OutputStream out,
java.util.Map fproperties)
throws IHtmlToPdfTransformer.CConvertException
url - Url to the documentsize - PDF Page sizehf - header-footer listout - outputstream to render intofproperties - properties map
IHtmlToPdfTransformer.CConvertException - if an unexpected error occurs.
public final void convertToPdf(java.lang.String content,
IHtmlToPdfTransformer.PageSize size,
java.util.List hf,
java.lang.String furlForBase,
java.io.OutputStream out,
java.util.Map fproperties)
throws IHtmlToPdfTransformer.CConvertException
content - the html document as a stringsize - PDF Page sizehf - header-footer listfurlForBase - base url of the document, mandatory, must end
with a '/'out - outputstream to render intofproperties - properties map
IHtmlToPdfTransformer.CConvertException - if an unexpected error occurs
protected final void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwable - if an unexpected error occursprivate final void init()
private IHtmlToPdfTransformer getTransformer(java.util.Map properties)
properties - The properties map.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||