Package com.caucho.util

Examples of com.caucho.util.CharBuffer.charAt()


      if (key.equalsIgnoreCase("status")) {
        int status = 0;
        int len = value.length();

        for (int i = 0; i < len; i++) {
          char digit = value.charAt(i);

          if ('0' <= digit && digit <= '9')
            status = 10 * status + digit - '0';
          else
            break;
View Full Code Here


              ws.println("</message>");
            return false;
          }
          if (ws != null && ! line.startsWith("From ")) {
            for (int i = 0; i < line.length(); i++) {
              char ch = line.charAt(i);
              if (ch == '<')
                ws.print("&lt;");
              else
                ws.print(ch);
            }
View Full Code Here

    else if (len <= i + 3
       || (ch = uri.charAt(i + 3)) == '/' || ch == '\\') {
      int j;
     
      for (j = cb.length() - 1; j >= 0; j--) {
        if ((ch = cb.charAt(j)) == '/' || ch == '\\')
    break;
      }
      if (j > 0)
        cb.setLength(j);
      else
View Full Code Here

          _cookies.add(cookie);
        }
      }
      else if (cookie == null) {
        if (cbName.matchesIgnoreCase("Version"))
          version = cbValue.charAt(0) - '0';
      }
      else if (cbName.matchesIgnoreCase("Version"))
        cookie.setVersion(cbValue.charAt(0) - '0');
      else if (cbName.matchesIgnoreCase("Domain"))
        cookie.setDomain(cbValue.toString());
View Full Code Here

      else if (cookie == null) {
        if (cbName.matchesIgnoreCase("Version"))
          version = cbValue.charAt(0) - '0';
      }
      else if (cbName.matchesIgnoreCase("Version"))
        cookie.setVersion(cbValue.charAt(0) - '0');
      else if (cbName.matchesIgnoreCase("Domain"))
        cookie.setDomain(cbValue.toString());
      else if (cbName.matchesIgnoreCase("Path"))
        cookie.setPath(cbValue.toString());
    }
View Full Code Here

    if (cb.length() < 64)
      return cb.close();

    long hash = 37;
    for (int i = 0; i < cb.length(); i++)
      hash = 65521 * hash + cb.charAt(i);

    cb.setLength(32);
    Base64.encode(cb, hash);

    return cb.close();
View Full Code Here

        if (di2 > di)
          cb.delete(di,di2+1);
      }

      for (int i = 0; i < cb.length(); i++) {
        char ch = cb.charAt(i);
        if (i > 0 && ch == '/'  || ch == '\\' || ch == '#')
          cb.setCharAt(i,'.');
      }

      _query = cb.toString();
View Full Code Here

      _isKeepalive = false;
      return;
    }

    int i = 0;
    for (i = 0; i < line.length() && line.charAt(i) != ' '; i++) {
    }
   
    for (; i < line.length() && line.charAt(i) == ' '; i++) {
    }
   
View Full Code Here

    int i = 0;
    for (i = 0; i < line.length() && line.charAt(i) != ' '; i++) {
    }
   
    for (; i < line.length() && line.charAt(i) == ' '; i++) {
    }
   
    int status = 0;
    for (; i < line.length(); i++) {
      char ch = line.charAt(i);
View Full Code Here

    for (; i < line.length() && line.charAt(i) == ' '; i++) {
    }
   
    int status = 0;
    for (; i < line.length(); i++) {
      char ch = line.charAt(i);
      if (ch >= '0' && ch <= '9')
        status = 10 * status + ch - '0';
      else
        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.