Package java.lang

Examples of java.lang.String.split()


    public static List<URL> parseWhitespaceCommaFile(String filename) throws FileNotFoundException, MalformedURLException, IOException {
        List<URL> list = new ArrayList<URL>();
        LineNumberReader lr = new LineNumberReader(new BufferedReader(new FileReader(new File(filename))));
        String line = lr.readLine();
        while (line != null) {
            List<String> s = Arrays.asList(line.split("[\\s,]+"));
            for (String i : s) {
                try {
                    list.add(new URL(i));
                } catch(MalformedURLException ex) {
                   
View Full Code Here


            NodeList ruleEntries = rules.item(i).getChildNodes();              
            for (int j = 0; j < ruleEntries.getLength(); j++) {
                Node ruleEntry = ruleEntries.item(j);
                if (ruleEntry.getNodeName().equals("name")) {
                    String name = ruleEntry.getFirstChild().getNodeValue();
                    String[] nameContents = name.split("-");

                    if (nameContents.length != 8) {
                        continue;
                    }
View Full Code Here

    }

    public String[] getStrings(final String name, final char separator) {
        final String value = this.data.get(name);
        if(value != null && value.length() > 0) {
            final String[] strings = value.split(Pattern.quote(Character.toString(separator)));
            return strings;
        }
        return new String[0];
    }
View Full Code Here

                org.glassfish.web.deployment.runtime.ClassLoader.EXTRA_CLASS_PATH);
        if (value != null) {
            // Parse the extra classpath into its ':' and ';' separated
            // components. Ignore ':' as a separator if it is preceded by
            // '\'
            String[] pathElements = value.split(";|((?<!\\\\):)");
            if (pathElements != null) {
                for (String path : pathElements) {
                    path = path.replace("\\:", ":");
                    if (logger.isLoggable(Level.FINE)) {
                        logger.log(Level.FINE, ADDING_CLASSPATH, new Object[]{getPath(), path});
View Full Code Here

    // index.html
    // /images/test.png
    // /locales/es/index.html
    //
    if (resource.startsWith("locales/")) {
      String[] parts = resource.split("/");
      String prefix = "/" + parts[0] + "/" + parts[1] + "/";
      String nonLocalResource = resource.substring(resource.indexOf(prefix)
          + prefix.length());
      basePath = basePath.replace(resource, nonLocalResource);
      resource = nonLocalResource;
View Full Code Here

                org.glassfish.web.deployment.runtime.ClassLoader.EXTRA_CLASS_PATH);
        if (value != null) {
            // Parse the extra classpath into its ':' and ';' separated
            // components. Ignore ':' as a separator if it is preceded by
            // '\'
            String[] pathElements = value.split(";|((?<!\\\\):)");
            if (pathElements != null) {
                for (String path : pathElements) {
                    path = path.replace("\\:", ":");
                    if (logger.isLoggable(Level.FINE)) {
                        logger.log(Level.FINE, ADDING_CLASSPATH, new Object[]{getPath(), path});
View Full Code Here

                org.glassfish.web.deployment.runtime.ClassLoader.EXTRA_CLASS_PATH);
        if (value != null) {
            // Parse the extra classpath into its ':' and ';' separated
            // components. Ignore ':' as a separator if it is preceded by
            // '\'
            String[] pathElements = value.split(";|((?<!\\\\):)");
            if (pathElements != null) {
                for (String path : pathElements) {
                    path = path.replace("\\:", ":");
                    if (logger.isLoggable(Level.FINE)) {
                        logger.log(Level.FINE, ADDING_CLASSPATH, new Object[]{getPath(), path});
View Full Code Here

                org.glassfish.web.deployment.runtime.ClassLoader.EXTRA_CLASS_PATH);
        if (value != null) {
            // Parse the extra classpath into its ':' and ';' separated
            // components. Ignore ':' as a separator if it is preceded by
            // '\'
            String[] pathElements = value.split(";|((?<!\\\\):)");
            if (pathElements != null) {
                for (String path : pathElements) {
                    path = path.replace("\\:", ":");
                    if (logger.isLoggable(Level.FINE)) {
                        logger.log(Level.FINE, ADDING_CLASSPATH, new Object[]{getPath(), path});
View Full Code Here

                org.glassfish.web.deployment.runtime.ClassLoader.EXTRA_CLASS_PATH);
        if (value != null) {
            // Parse the extra classpath into its ':' and ';' separated
            // components. Ignore ':' as a separator if it is preceded by
            // '\'
            String[] pathElements = value.split(";|((?<!\\\\):)");
            if (pathElements != null) {
                for (String path : pathElements) {
                    path = path.replace("\\:", ":");
                    if (logger.isLoggable(Level.FINE)) {
                        logger.log(Level.FINE, ADDING_CLASSPATH, new Object[]{getPath(), path});
View Full Code Here

                org.glassfish.web.deployment.runtime.ClassLoader.EXTRA_CLASS_PATH);
        if (value != null) {
            // Parse the extra classpath into its ':' and ';' separated
            // components. Ignore ':' as a separator if it is preceded by
            // '\'
            String[] pathElements = value.split(";|((?<!\\\\):)");
            if (pathElements != null) {
                for (String path : pathElements) {
                    path = path.replace("\\:", ":");
                    if (logger.isLoggable(Level.FINE)) {
                        logger.log(Level.FINE, ADDING_CLASSPATH, new Object[]{getPath(), path});
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.