Package com.subhajit.common.util.CommonUtils

Examples of com.subhajit.common.util.CommonUtils.DirectoryParser


            new File(".").toURI().toURL().getProtocol())) {
          File file = new File(url.getFile());
          if (file.exists()) {
            Iterator<IResource> resources = null;
            if (file.isDirectory()) {
              resources = new DirectoryParser(file)
                  .iterator();
            } else if (file.isFile()
                && file.getName().endsWith(".jar")) {
              zipFile = new ZipFile(file);
              resources = new ZipParser(zipFile)
View Full Code Here


                        int basePackageLength = StrUtils.parse(barePackageName,
                                ".").length;
                        for (int i = 0; i < basePackageLength; i++) {
                            file = file.getParentFile();
                        }
                        parser = new DirectoryParser(file);
                    } else if (file.isFile() && file.getName().endsWith(".jar")) {
                        zipFile = new ZipFile(file);
                        parser = new ZipParser(zipFile);
                    } else {
                        throw new UnsupportedOperationException(
View Full Code Here

    if (!result.isSuccessful()) {
      throw new RuntimeException(result.toString());
    } else {
      // Now copy the resources from the source paths.
      for (File sourcePath : sourcePaths) {
        for (Iterator<IResource> it = new DirectoryParser(sourcePath)
            .iterator(); it.hasNext();) {
          IResource resource = it.next();
          if (!resource.isDirectory()) {
            if (!resource.getName().endsWith(".java")) {
              File destFile = new File(outputDirectory, resource
View Full Code Here

      // Set used to track duplicate entries in the zip file.
      Set<String> entries = new HashSet<String>();
      zOut = new ZipOutputStream(new BufferedOutputStream(
          new FileOutputStream(outputZipFile)));
      for (File sourcePath : sourcePaths) {
        for (Iterator<IResource> it = new DirectoryParser(sourcePath)
            .iterator(); it.hasNext();) {
          IResource resource = it.next();
          if (!resource.isDirectory()) {
            if (entries.contains(resource.getName())) {
              continue;
View Full Code Here

          try {
            if (file.isFile() && file.getName().endsWith(".jar")) {
              zipFile = new ZipFile(file);
              parser = new ZipParser(zipFile);
            } else if (file.isDirectory()) {
              parser = new DirectoryParser(file);
            }
            for (Iterator<IResource> it = parser
                .iterator(); it.hasNext();) {
              IResource resource = it.next();
              if (!resource.isDirectory()
View Full Code Here

            new File(".").toURI().toURL().getProtocol())) {
          File file = new File(url.getFile());
          if (file.exists()) {
            Iterator<IResource> resources = null;
            if (file.isDirectory()) {
              resources = new DirectoryParser(file)
                  .iterator();
            } else if (file.isFile()
                && file.getName().endsWith(".jar")) {
              zipFile = new ZipFile(file);
              resources = new ZipParser(zipFile)
View Full Code Here

TOP

Related Classes of com.subhajit.common.util.CommonUtils.DirectoryParser

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.