Class StaticResource


  • public class StaticResource
    extends ReportPage
    Static resource file (e.g. CSS or JS).

    Overrides methods hashCode() and equals(Object) so that different components may add all necessary resources in their generator: copies would be deleted automatically so there wouldn't be any repeated copying.

    • Constructor Detail

      • StaticResource

        public StaticResource​(java.lang.String inPath,
                              java.lang.String outPath)
        Constructor.
        Parameters:
        inPath - Source path in filesystem or in classpath.
        outPath - Result path relative root generation.
    • Method Detail

      • generate

        public void generate()
                      throws java.io.IOException
        Description copied from class: ReportPage
        Generates complete page text.
        Specified by:
        generate in class ReportPage
        Throws:
        java.io.IOException - Input-Output error.
      • copy

        protected static void copy​(java.io.InputStream is,
                                   java.io.OutputStream os)
                            throws java.io.IOException
        Copy entire contents from one stream to another. Does not close streams.
        Throws:
        java.io.IOException
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object