src/main/java/org/vafer/jdependency/utils/DependencyUtils.java
public static Set<String> getDependenciesOfClass( final InputStream pInputStream ) throws IOException {
        final DependenciesClassAdapter v = new DependenciesClassAdapter();
        new ClassReader( pInputStream ).accept( v, ClassReader.EXPAND_FRAMES );
        final Set<String> depNames = v.getDependencies();
        return depNames;
    }
public static Set<String> getDependenciesOfClass( final InputStream pInputStream ) throws IOException {
        final DependenciesClassAdapter v = new DependenciesClassAdapter();
        new ClassReader( pInputStream ).accept( v, ClassReader.EXPAND_FRAMES );
        final Set<String> depNames = v.getDependencies();
        return depNames;
    }
public static Set < String > getDependenciesOfClass ( final InputStream pInputStream ) throws IOException { final DependenciesClassAdapter v = new DependenciesClassAdapter ( ) ; new ClassReader ( pInputStream ) . accept ( v , ClassReader . EXPAND_FRAMES ) ; final Set < String > depNames = v . getDependencies ( ) ; return depNames ; }
/*
public static Set<String> getDependenciesOfJar( final InputStream pInputStream ) throws IOException {

final JarInputStream inputStream = new JarInputStream(pInputStream);
final NullOutputStream nullStream = new NullOutputStream();
final Set<String> dependencies = new HashSet<String>();

try {
while (true) {
final JarEntry entry = inputStream.getNextJarEntry();

if (entry == null) {
break;
}

if (entry.isDirectory()) {
ignore directory entries
IOUtils.copy(inputStream, nullStream);
continue;
}

final String name = entry.getName();

if (name.endsWith(".class")) {
final DependenciesClassAdapter v = new DependenciesClassAdapter();
new ClassReader( inputStream ).accept( v, 0 );
dependencies.addAll(v.getDependencies());
} else {
IOUtils.copy(inputStream, nullStream);
}
}
} finally {
inputStream.close();
}

return dependencies;
}
/ * public static Set<String > getDependenciesOfJar ( final InputStream pInputStream ) throws IOException {