Get the class file entries from the Jar
( URL jar )
| 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") ); |
no test coverage detected