MCPcopy Create free account
hub / github.com/beanshell/beanshell / searchJarForClasses

Method searchJarForClasses

src/bsh/classpath/BshClassPath.java:482–500  ·  view source on GitHub ↗

Get the class file entries from the Jar

( URL jar )

Source from the content-addressed store, hash-verified

480 Get the class file entries from the Jar
481 */
482 static String [] searchJarForClasses( URL jar )
483 throws IOException
484 {
485 Vector v = new Vector();
486 InputStream in = jar.openStream();
487 ZipInputStream zin = new ZipInputStream(in);
488
489 ZipEntry ze;
490 while( (ze= zin.getNextEntry()) != null ) {
491 String name=ze.getName();
492 if ( isClassFileName( name ) )
493 v.addElement( canonicalizeClassName(name) );
494 }
495 zin.close();
496
497 String [] sa = new String [v.size()];
498 v.copyInto(sa);
499 return sa;
500 }
501
502 public static boolean isClassFileName( String name ){
503 return ( name.toLowerCase().endsWith(".class") );

Callers 1

mapMethod · 0.95

Calls 5

isClassFileNameMethod · 0.95
canonicalizeClassNameMethod · 0.95
getNameMethod · 0.45
closeMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected