Package java.util.zip

Examples of java.util.zip.ZipFile.entries()


        DependencyVisitor v = new DependencyVisitor();

        ZipFile f = new ZipFile(args[0]);

        long l1 = System.currentTimeMillis();
        Enumeration< ? extends ZipEntry> en = f.entries();
        while (en.hasMoreElements()) {
            ZipEntry e = en.nextElement();
            String name = e.getName();
            if (name.endsWith(".class")) {
                new ClassReader(f.getInputStream(e)).accept(v, 0);
View Full Code Here


            String docAuthor      = null;
            String docLanguage    = null;
           
            // opening the file as zip file
            final ZipFile zipFile = new ZipFile(dest);
            final Enumeration<? extends ZipEntry> zipEnum = zipFile.entries();
            final SAXParserFactory saxParserFactory = SAXParserFactory.newInstance();
           
            // looping through all containing files
            while (zipEnum.hasMoreElements()) {
               
View Full Code Here

            String docAuthor      = null;
            String docLanguage    = null;
           
            // opening the file as zip file
            final ZipFile zipFile= new ZipFile(dest);
            final Enumeration<? extends ZipEntry> zipEnum = zipFile.entries();
            final SAXParserFactory saxParserFactory = SAXParserFactory.newInstance();
           
            // looping through all containing files
            while (zipEnum.hasMoreElements()) {
               
View Full Code Here

            }
        } else if (f.getName().endsWith(".jar")) {
            File g = new File(f.getParentFile(), f.getName() + ".new");
            ZipFile zf = new ZipFile(f);
            ZipOutputStream out = new ZipOutputStream(new FileOutputStream(g));
            Enumeration<? extends ZipEntry> e = zf.entries();
            byte[] buf = new byte[10000];
            while (e.hasMoreElements()) {
                ZipEntry ze = e.nextElement();
                if (ze.isDirectory()) {
                    continue;
View Full Code Here

  public static void main(String[] args) throws Exception {
    ZipFile zip = new ZipFile(args[0]);
    String clazz = args.length > 1 ? args[1] : null;

    List classes = new ArrayList();
    Enumeration entries = zip.entries();
    while (entries.hasMoreElements()) {
      ZipEntry e = (ZipEntry) entries.nextElement();
      String s = e.getName();
      if (s.endsWith(".class")) {
        s = s.substring(0, s.length() - 6).replace('/', '.');
View Full Code Here

                System.err.println("Error openning " + jars.get(i));
                e.printStackTrace();
                continue;
            }

            Enumeration<? extends ZipEntry> entries = zip.entries();
            while (entries.hasMoreElements()) {
                ZipEntry e = entries.nextElement();
                String s = e.getName();
                if (s.endsWith(".class")) {
                    s = s.substring(0, s.length() - 6).replace('/', '.');
View Full Code Here

    private List<Runner> createRunners(String archivePath) throws InitializationError
    {
        List<Runner> list = new ArrayList<Runner>();
        try {
            final ZipFile archive = new ZipFile(archivePath);
            Enumeration< ? extends ZipEntry> entries = archive.entries();
            while (entries.hasMoreElements()) {
                ZipEntry entry = entries.nextElement();
                if (entry.isDirectory()) {
                    continue;
                }
View Full Code Here

  private static void unzipWrapper(String destination, String zipFileName) throws IOException, IOException
  {
    ZipFile zipFile = new ZipFile(zipFileName);

    Enumeration<? extends ZipEntry> entries = zipFile.entries();

    while (entries.hasMoreElements())
    {
      ZipEntry entry = (ZipEntry) entries.nextElement();
View Full Code Here

    }
    try {
      boolean hasDebugAttributes = false;
      if (org.aspectj.org.eclipse.jdt.internal.compiler.util.Util.isArchiveFileName(this.file)) {
        ZipFile jarFile = new ZipFile(this.file);
        for (Enumeration entries = jarFile.entries(); !hasDebugAttributes && entries.hasMoreElements(); ) {
          ZipEntry entry = (ZipEntry) entries.nextElement();
          if (org.aspectj.org.eclipse.jdt.internal.compiler.util.Util.isClassFileName(entry.getName())) {
            IClassFileReader classFileReader = ToolFactory.createDefaultClassFileReader(this.file, entry.getName(), IClassFileReader.ALL);
            hasDebugAttributes = checkClassFile(classFileReader);
          }
View Full Code Here

          String EXISTS = "OK"; //$NON-NLS-1$
          String DELETED = "DELETED"; //$NON-NLS-1$
          SimpleLookupTable indexedFileNames = new SimpleLookupTable(max == 0 ? 33 : max + 11);
          for (int i = 0; i < max; i++)
            indexedFileNames.put(paths[i], DELETED);
          for (Enumeration e = zip.entries(); e.hasMoreElements();) {
            // iterate each entry to index it
            ZipEntry ze = (ZipEntry) e.nextElement();
            String zipEntryName = ze.getName();
            if (Util.isClassFileName(zipEntryName))
              indexedFileNames.put(zipEntryName, EXISTS);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.