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


          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

              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

    }

    if (! seenDigit)
      expt = 1;

    while (digits.length() > 0 && digits.charAt(digits.length() - 1) == '0')
      digits.setLength(digits.length() - 1);

    if (type == 'f') {
      if (roundDigits(digits, expt + prec)) {
        expt++;
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

      parseDescr = "using href to determine fullName";
      t.append(path);
      t.setLength(t.length() - 5); // drop .hmtl
      for (int ti = t.length() - 1; ti >= 0; ti--) {
        if (t.charAt(ti) == '/')
          t.setCharAt(ti,'.');
      }
      if (anchor != null) {
        t.append('.');
        t.append(anchor);
View Full Code Here

      }
      i++;
    }

    int l = r.length() - 1;
    while (l > 0 && Character.isWhitespace(r.charAt(l))) {
      r.setLength(l--);
    }

    cb.clear();
    cb.append(r);
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.