jdr/jboss-as-jdr/src/main/java/org/jboss/as/jdr/util/JdrZipFile.java
public void add(VirtualFile file, InputStream is) throws Exception {
        String name = "JBOSS_HOME" + file.getPhysicalFile().getAbsolutePath().substring(this.jbossHome.length());
        this.add(is, name);
    }
public void add(VirtualFile file, InputStream is) throws Exception {
        String name = "JBOSS_HOME" + file.getPhysicalFile().getAbsolutePath().substring(this.jbossHome.length());
        this.add(is, name);
    }
public void add ( VirtualFile file , InputStream is ) throws Exception { String name = "JBOSS_HOME" + file . getPhysicalFile ( ) . getAbsolutePath ( ) . substring ( this . jbossHome . length ( ) ) ; this . add ( is , name ) ; }
Adds the content of the {@link InputStream} to the zip in a location that mirrors where {@link VirtualFile file} is located.

For example if {@code file} is at {@code /tmp/foo/bar} and {@code $JBOSS_HOME} is {@code tmp} then the destination will be {@code JBOSSHOME/foo/bar}

@param file {@link VirtualFile} where metadata is read from
@param is content to write to the zip file
@throws Exception
Adds the content of the { @link InputStream } to the zip in a location that mirrors where { @link VirtualFile file } is located .