org.objectweb.dsrg.sofa.repository.server.webapp.jar
Class JarInspector

java.lang.Object
  extended by org.objectweb.dsrg.sofa.repository.server.webapp.jar.JarInspector

public class JarInspector
extends java.lang.Object

Helper class for inspecting JARs and finding classes.


Constructor Summary
JarInspector(java.lang.String repositoryPath)
           
 
Method Summary
 java.io.InputStream findJarEntry(java.io.File jarFile, java.lang.String entryName, boolean recursive)
          Searches for specified entry in specified JAR file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JarInspector

public JarInspector(java.lang.String repositoryPath)
Method Detail

findJarEntry

public java.io.InputStream findJarEntry(java.io.File jarFile,
                                        java.lang.String entryName,
                                        boolean recursive)
                                 throws java.io.IOException
Searches for specified entry in specified JAR file. If recursive is set to true, then searches recursively in dependent CodeBundles and their JARs. This is supported by prepared dependencies file in META-INF directory of JAR file.

Parameters:
jarFile -
entryName -
recursive -
Returns:
the entry or null if not found
Throws:
java.io.IOException