Package java.lang

Examples of java.lang.String.substring()


        String serverName = http.getServerName();
        if (serverName != null && serverName.length() > 0) {
            // Ignore scheme, which was required for webcore issued redirects
            // in 8.x EE
            if (serverName.startsWith("http://")) {
                serverName = serverName.substring("http://".length());
            } else if (serverName.startsWith("https://")) {
                serverName = serverName.substring("https://".length());
            }
            int index = serverName.indexOf(':');
            if (index != -1) {
View Full Code Here


            // Ignore scheme, which was required for webcore issued redirects
            // in 8.x EE
            if (serverName.startsWith("http://")) {
                serverName = serverName.substring("http://".length());
            } else if (serverName.startsWith("https://")) {
                serverName = serverName.substring("https://".length());
            }
            int index = serverName.indexOf(':');
            if (index != -1) {
                setProxyName(serverName.substring(0, index).trim());
                String serverPort = serverName.substring(index+1).trim();
View Full Code Here

            } else if (serverName.startsWith("https://")) {
                serverName = serverName.substring("https://".length());
            }
            int index = serverName.indexOf(':');
            if (index != -1) {
                setProxyName(serverName.substring(0, index).trim());
                String serverPort = serverName.substring(index+1).trim();
                if (serverPort.length() > 0) {
                    try {
                        setProxyPort(Integer.parseInt(serverPort));
                    } catch (NumberFormatException nfe) {
View Full Code Here

            int fromIndex = 0;
            while (index != -1) {
                cipher = ciphers.substring(fromIndex, index).trim();
                if (cipher.length() > 0 && !cipher.startsWith("-")) {
                    if (cipher.startsWith("+")) {
                        cipher = cipher.substring(1);
                    }
                    String jsseCipher = getJSSECipher(cipher);
                    if (jsseCipher == null) {
                        _logger.log(Level.WARNING,
                            UNRECOGNIZED_CIPHER, cipher);
View Full Code Here

            return;
        }

        altDDName = altDDName.trim();
        if (altDDName.startsWith("/")) {
            altDDName = altDDName.substring(1);
        }
     
        String appLoc = dc.getSource().getParentArchive().getURI().getPath();
        altDDName = appLoc + altDDName;
View Full Code Here

        String contentType = getContentType();
        if (contentType == null)
            contentType = "";
        int semicolon = contentType.indexOf(';');
        if (semicolon >= 0) {
            contentType = contentType.substring(0, semicolon).trim();
        } else {
            contentType = contentType.trim();
        }
        if (!("application/x-www-form-urlencoded".equals(contentType))) {
            return null;
View Full Code Here

        {
            return filename;
        }
        else
        {
            return filename.substring(0, index);
        }
    }

    public String getFilename(String fullname)
    {
View Full Code Here

    }
  m = ratioPat.matcher(s);
  if(m.matches())
    {
    String numerator = m.group(1);
    if (numerator.startsWith("+")) numerator = numerator.substring(1);

    return Numbers.divide(Numbers.reduceBigInt(BigInt.fromBigInteger(new BigInteger(numerator))),
                          Numbers.reduceBigInt(BigInt.fromBigInteger(new BigInteger(m.group(2)))));
    }
  return null;
View Full Code Here

  private String bundlePath(File bundleFile) {
 
    String rootPath = bundleDir.getAbsolutePath();
    String thisPath = bundleFile.getAbsolutePath();
 
    return thisPath.substring(rootPath.length());
 
  }
}
View Full Code Here

        String s = sb.toString();
        // CUSTOM NUMBERS start
        boolean convert = Character.isLetter(s.charAt(s.length()-1)) && !s.contains("x");
        Number n;
        if (convert) {
            n = matchNumber(s.substring(0, s.length()-1));
            s = s.toLowerCase();
            if (s.endsWith("d")) {
                n = n.doubleValue();
            } else if (s.endsWith("f")) {
                n = n.floatValue();
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.