Package ch.inftec.ju.util.RegexUtil

Examples of ch.inftec.ju.util.RegexUtil.Match


          // Now, we'll try to access the resource within a JAR. We'll still make sure that the JAR actually exists as an
          // accessible file.
          RegexUtil jarFile = new RegexUtil("(file:.+/([^/]+\\.jar))/");
          Match[] matches = jarFile.getMatches(newPath);
          if (matches.length > 0) {
            Match lastMatch = matches[matches.length - 1];
            String jarFilePath = lastMatch.getGroups()[0];
            if (IOUtil.exists().file(jarFilePath)) {
              String jarFileName = lastMatch.getGroups()[1];

              newPath = "jar:" + newPath.replaceAll(jarFileName + "/", jarFileName + "!/");

              try {
                return new URL(newPath);
View Full Code Here

TOP

Related Classes of ch.inftec.ju.util.RegexUtil.Match

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.