Class ArtifactStreamOutput


  • public class ArtifactStreamOutput
    extends Object
    Utility functions for dumping artifacts to an output stream in different formats.
    Author:
    burgetr
    • Constructor Detail

      • ArtifactStreamOutput

        public ArtifactStreamOutput()
    • 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 page
        os - 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 page
        os - 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 page
        os - 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 page
        os - 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 tree
        os - 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 tree
        page - the page artifact the area tree was created from
        os - 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 tree
        page - the page artifact the area tree was created from
        os - 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 tree
        page - the page artifact the area tree was created from
        os - the target output stream
        Throws:
        IOException