Package cz.vutbr.fit.layout.io
Class ArtifactStreamOutput
- java.lang.Object
-
- cz.vutbr.fit.layout.io.ArtifactStreamOutput
-
public class ArtifactStreamOutput extends Object
Utility functions for dumping artifacts to an output stream in different formats.- Author:
- burgetr
-
-
Constructor Summary
Constructors Constructor Description ArtifactStreamOutput()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
outputHTML(AreaTree atree, Page page, OutputStream os)
Serializes an area tree to an output stream in XML format.static void
outputHTML(Page page, OutputStream os)
Serializes a page to an output stream in HTML format.static void
outputPNG(AreaTree atree, Page page, OutputStream os)
Serializes an area tree to an output stream as a PNG image using a screen shot if available.static void
outputPNG(Page page, OutputStream os)
Serializes a page to an output stream as a PNG image using a screen shot if available.static void
outputPNGi(AreaTree atree, Page page, OutputStream os)
Serializes an area tree to an output stream as a PNG image by rendering the internal representation of the page.static void
outputPNGi(Page page, OutputStream os)
Serializes a page to an output stream as a PNG image by rendering the internal representation of the page.static void
outputXML(AreaTree atree, OutputStream os)
Serializes an area tree to an output stream in XML format.static void
outputXML(Page page, OutputStream os)
Serializes a page to an output stream in XML format.
-
-
-
Method Detail
-
outputXML
public static void outputXML(Page page, OutputStream os) throws IOException
Serializes a page to an output stream in XML format.- Parameters:
page
- the source pageos
- the target output stream- Throws:
IOException
-
outputHTML
public static void outputHTML(Page page, OutputStream os) throws IOException
Serializes a page to an output stream in HTML format.- Parameters:
page
- the source pageos
- the target output stream- Throws:
IOException
-
outputPNG
public static void outputPNG(Page page, OutputStream os) throws IOException
Serializes a page to an output stream as a PNG image using a screen shot if available. If the screenshot is not available, an internal representation of the page is rendered instead.- Parameters:
page
- the source pageos
- the target output stream- Throws:
IOException
-
outputPNGi
public static void outputPNGi(Page page, OutputStream os) throws IOException
Serializes a page to an output stream as a PNG image by rendering the internal representation of the page.- Parameters:
page
- the source pageos
- the target output stream- Throws:
IOException
-
outputXML
public static void outputXML(AreaTree atree, OutputStream os) throws IOException
Serializes an area tree to an output stream in XML format.- Parameters:
atree
- the source area treeos
- the target output stream- Throws:
IOException
-
outputHTML
public static void outputHTML(AreaTree atree, Page page, OutputStream os) throws IOException
Serializes an area tree to an output stream in XML format.- Parameters:
atree
- the source area treepage
- the page artifact the area tree was created fromos
- the target output stream- Throws:
IOException
-
outputPNG
public static void outputPNG(AreaTree atree, Page page, OutputStream os) throws IOException
Serializes an area tree to an output stream as a PNG image using a screen shot if available. If the screenshot is not available, an internal representation of the page is rendered instead.- Parameters:
atree
- the source area treepage
- the page artifact the area tree was created fromos
- the target output stream- Throws:
IOException
-
outputPNGi
public static void outputPNGi(AreaTree atree, Page page, OutputStream os) throws IOException
Serializes an area tree to an output stream as a PNG image by rendering the internal representation of the page.- Parameters:
atree
- the source area treepage
- the page artifact the area tree was created fromos
- the target output stream- Throws:
IOException
-
-