Package java.lang

Examples of java.lang.String.substring()


            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


        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

    //
    @NonNls
    String canonicalTarget = target;

    if ( canonicalTarget.charAt( canonicalTarget.length() - 1 ) == SLASH || canonicalTarget.charAt( canonicalTarget.length() - 1 ) == BACKSLASH ) {
      canonicalTarget = canonicalTarget.substring( 0, canonicalTarget.length() - 1 );
    }

    if ( canonicalTarget.equals( canonicalBase ) ) {
      return ".";
    }
View Full Code Here

  String s = null;
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case STRING:
      t = jj_consume_token(STRING);
    s = t.toString();
    {if (true) return s.substring(1, s.length()-1);}
      break;
    case ID:
      t = jj_consume_token(ID);
    s = t.toString();
    {if (true) return s.substring(1, s.length()-1);}
View Full Code Here

    {if (true) return s.substring(1, s.length()-1);}
      break;
    case ID:
      t = jj_consume_token(ID);
    s = t.toString();
    {if (true) return s.substring(1, s.length()-1);}
      break;
    case ID2:
      t = jj_consume_token(ID2);
    {if (true) return t.toString();}
      break;
View Full Code Here

  {
        // Get the current time and convert to a String
        long millis = System.currentTimeMillis();
        Timestamp ts = new Timestamp(millis);
        String s = ts.toString();
        s = s.substring(0, s.lastIndexOf("."));
        return s;
  }

  // no instances permitted.
  private CurrentTime() {}
View Full Code Here

                             for(Enumeration e = SourceClassList.elements(); e.hasMoreElements();) {
                                 String clsName = CurrLine.substring(JcovClassLine.length());
                                 int idx = clsName.indexOf(' ');

                                 if (idx != -1) {
                                     clsName = clsName.substring(0, idx);
                                 }
                                 Class = (String)e.nextElement();
                                 if ( Class.compareTo(clsName) == 0) {
                                     first = false;
                                     break;
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.