|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.jrefinery.report.targets.table.html.DirectoryHtmlFilesystem
Writes the generated Html-File and the supplementary data files (images and external Stylesheet definition) into a directory. The data files can be written into a separated data directory.
External referenced content can either be copied into the data directory or could
be included as linked content. This behaviour is controled by the copyExternalImages
flag.
Constructor Summary | |
DirectoryHtmlFilesystem(java.io.File file)
Creates a new DirectoryHtmlFilesystem, using the file as root
file and the file's directory as data directory to store the generated data files. |
|
DirectoryHtmlFilesystem(java.io.File file,
java.io.File dataDirectory)
Creates a new DirectoryHtmlFilesystem, using the file as root
file and the dataDirectory to store the generated data files. |
Method Summary | |
void |
close()
Close the Filesystem and write any buffered content. |
HtmlReferenceData |
createCSSReference(java.lang.String styleSheet)
Creates a HtmlReference for StyleSheetData. |
HtmlReferenceData |
createImageReference(ImageReference reference)
Creates a HtmlReference for ImageData. |
java.io.OutputStream |
getRootStream()
The root stream is used to write the main HTML-File. |
boolean |
isCopyExternalImages()
Returns true, if external content should be copied into the DataDirectory of the ZIPFile or false if the content should be included as linked content. |
protected boolean |
isSupportedImageFormat(java.net.URL url)
Tests, whether the given URL points to a supported file format for common browsers. |
void |
setCopyExternalImages(boolean copyExternalImages)
Defines, whether external content should be copied into the DataDirectory of the ZIPFile or should be included as linked content. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DirectoryHtmlFilesystem(java.io.File file) throws java.io.IOException
file
as root
file and the file's directory as data directory to store the generated data files.
file
- the filename of the root html file.
java.io.IOException
- if an error occurs.public DirectoryHtmlFilesystem(java.io.File file, java.io.File dataDirectory) throws java.io.IOException
file
as root
file and the dataDirectory
to store the generated data files.
file
- the filename of the root html file.dataDirectory
- the name of the data directory, where the files should be created.
java.io.IOException
- if an error occurs.Method Detail |
public boolean isCopyExternalImages()
Linked content reduces the filesize, but the reader of the report will need access to the linked files. If you pan to use the report offline, then it is best to copy all referenced data into the zip file.
public void setCopyExternalImages(boolean copyExternalImages)
Linked content reduces the filesize, but the reader of the report will need access to the linked files. If you pan to use the report offline, then it is best to copy all referenced data into the zip file.
copyExternalImages
- true, if external referenced content should be copied into the
ZIP file, false otherwise.public java.io.OutputStream getRootStream() throws java.io.IOException
getRootStream
in interface HtmlFilesystem
java.io.IOException
- if an IO error occured, while providing the root stream.protected boolean isSupportedImageFormat(java.net.URL url)
The checked filetypes are the ones recommended by the W3C.
url
- the url that should be tested.
public HtmlReferenceData createImageReference(ImageReference reference) throws java.io.IOException
createImageReference
in interface HtmlFilesystem
reference
- the image reference containing the data.
java.io.IOException
- if IO errors occured while creating the reference.isSupportedImageFormat(java.net.URL)
public HtmlReferenceData createCSSReference(java.lang.String styleSheet) throws java.io.IOException
createCSSReference
in interface HtmlFilesystem
styleSheet
- the stylesheet data, which should be referenced.
java.io.IOException
- if IO errors occured while creating the reference.public void close() throws java.io.IOException
close
in interface HtmlFilesystem
java.io.IOException
- if the close operation failed.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |