Package com.caucho.vfs

Examples of com.caucho.vfs.Jar$JarDigestDepend


    if (isNullScanPath(path)) {
      return;
    }
   
    ZipFile zipFile = null;
    Jar jar = JarPath.create(path).getJar();

    try {
      zipFile = jar.getZipFile();

      if (zipFile == null)
        return;
     
      boolean isScanMatch = false;

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

      while (e.hasMoreElements()) {
        ZipEntry entry = e.nextElement();

        String entryName = entry.getName();
        if (! entryName.endsWith(".class"))
          continue;

        if (packagePath != null && ! entryName.startsWith(packagePath))
          continue;

        matcher.init();

        ReadStream is = Vfs.openRead(zipFile.getInputStream(entry));
        try {
          classScanner.init(entryName, is, matcher);

          if (classScanner.scan())
            isScanMatch = true;
        } finally {
          is.close();
        }
      }
     
      if (! isScanMatch)
        addNullScanPath(path);
    } catch (IOException e) {
      log.log(Level.FINE, e.toString(), e);
    } finally {
      jar.closeZipFile(zipFile);
    }
  }
View Full Code Here


    else {
      // Find the path corresponding to the class
      for (int i = 0; i < _jarList.size(); i++) {
        JarEntry jarEntry = _jarList.get(i);
        JarPath path = jarEntry.getJarPath();
        Jar jar = path.getJar();
       
        try {
          ZipEntry zipEntry = jar.getZipEntry(pathName);

        // if (filePath.canRead() && filePath.getLength() > 0) {
       
          if (zipEntry != null && zipEntry.getSize() > 0) {
            Path filePath = path.lookup(pathName);
View Full Code Here

                                 String packagePath,
                                 ByteCodeClassScanner classScanner,
                                 JarByteCodeMatcher matcher)
  {
    ZipFile zipFile = null;
    Jar jar = JarPath.create(path).getJar();

    try {
      zipFile = jar.getZipFile();

      if (zipFile == null)
        return;

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

      while (e.hasMoreElements()) {
        ZipEntry entry = e.nextElement();

        String entryName = entry.getName();
        if (! entryName.endsWith(".class"))
          continue;

        if (packagePath != null && ! entryName.startsWith(packagePath))
          continue;

        matcher.init();

        ReadStream is = Vfs.openRead(zipFile.getInputStream(entry));
        try {
          classScanner.init(entryName, is, matcher);

          classScanner.scan();
        } finally {
          is.close();
        }
      }
    } catch (IOException e) {
      log.log(Level.FINE, e.toString(), e);
    } finally {
      jar.closeZipFile(zipFile);
    }
  }
View Full Code Here

TOP

Related Classes of com.caucho.vfs.Jar$JarDigestDepend

Copyright © 2018 www.massapicom. 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.