Class JdrZipFile


  • public class JdrZipFile
    extends Object
    Abstracts the zipfile used for packaging the JDR Report.
    • Method Detail

      • name

        public String name()
        Returns:
        the full pathname to the zipfile on disk
      • add

        public void add​(InputStream is,
                        String path)
        Adds the contents of the InputStream to the path in the zip. This method allows for absolute control of the destination of the content to be stored. It is not common to use this method.
        Parameters:
        is - content to write
        path - destination to write to in the zip file
      • add

        public void add​(org.jboss.vfs.VirtualFile file,
                        InputStream is)
                 throws Exception
        Adds the content of the InputStream to the zip in a location that mirrors where file is located. For example if file is at /tmp/foo/bar and $JBOSS_HOME is tmp then the destination will be JBOSSHOME/foo/bar
        Parameters:
        file - VirtualFile where metadata is read from
        is - content to write to the zip file
        Throws:
        Exception
      • add

        public void add​(String content,
                        String path)
                 throws Exception
        Adds content to the zipfile at path path is prepended with the directory reserved for generated text files in JDR
        Parameters:
        content -
        path -
        Throws:
        Exception
      • addAsString

        public void addAsString​(InputStream stream,
                                String path)
                         throws Exception
        Adds content to the zipfile at path path is prepended with the directory reserved for generated text files in JDR
        Parameters:
        stream -
        path -
        Throws:
        Exception
      • getProductDirName

        public String getProductDirName()
      • addLog

        public void addLog​(String content,
                           String logName)
                    throws Exception
        Adds content to the zipfile in a file named logName path is prepended with the directory reserved for JDR log files
        Parameters:
        content -
        logName -
        Throws:
        Exception