Package com.caucho.util

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


      }

      if (i < length && ! XmlChar.isNameStart(ch))
        throw new IOException("expected name at " + (char) ch);
     
      cb.clear();
      while (i < length && XmlChar.isNameChar(ch)) {
        cb.append((char) ch);

        ch = name.charAt(++i);
      }
View Full Code Here


        cb.append((char) ch);

        ch = name.charAt(++i);
      }
      String key = cb.toString();
      cb.clear();

      for (; i < length && XmlChar.isWhitespace(ch = name.charAt(i)); i++) {
      }

      if (ch != '=') {
View Full Code Here

      }

      if (i >= length)
        break;

      cb.clear();
      if (ch == '\'') {
        while (++i < length && (ch = name.charAt(i)) != '\'')
          cb.append((char) ch);
        i++;
      } else if (ch == '"') {
View Full Code Here

      i++;
      for (; i < length && XmlChar.isWhitespace(ch = pi.charAt(i)); i++) {
      }

      // Parse the attribute value: '.*' or ".*" or \w+
      valueBuf.clear();
      if (ch == '\'') {
        i++;
        for (; i < length && (ch = pi.charAt(i)) != '\''; i++)
          valueBuf.append((char) ch);
        i++;
View Full Code Here

      CharBuffer cbName = _cbName;
      CharBuffer cbValue = _cbValue;

      cbName.clear();
      cbValue.clear();

      for (;
           j < end && ((ch = buf[j]) == ' ' || ch == ';' || ch ==',');
           j++) {
      }
View Full Code Here

      while (cursor.current() != CharacterIterator.DONE) {
        char ch;
        for (; Character.isWhitespace(cursor.current()); cursor.next()) {
        }

        cb.clear();
        for (; (ch = cursor.current()) >= 'a' && ch <= 'z' ||
               ch >= 'A' && ch <= 'Z' ||
               ch >= '0' && ch <= '0';
             cursor.next()) {
          cb.append(cursor.current());
View Full Code Here

        }

        String language = cb.toString();
        String country = "";
        if (cursor.current() == '_' || cursor.current() == '-') {
          cb.clear();
          for (cursor.next();
               (ch = cursor.current()) >= 'a' && ch <= 'z' ||
               ch >= 'A' && ch <= 'Z' ||
               ch >= '0' && ch <= '9';
               cursor.next()) {
View Full Code Here

      }

      if (i >= len)
        break;

      cb.clear();
      for (;
           i < len && (ch = text.charAt(i)) != ' ' && ch != ',' && ch != '\t';
           i++) {
        cb.append(ch);
      }
View Full Code Here

            out.printJavaString(cb.toString());
            out.println("\");");
          }

          // scan the contents of '{' ... '}'
          cb.clear();
          for (i++; i < length && string.charAt(i) != '}'; i++)
            cb.append(string.charAt(i));

          printStringExpr(out, cb.toString());
View Full Code Here

          for (i++; i < length && string.charAt(i) != '}'; i++)
            cb.append(string.charAt(i));

          printStringExpr(out, cb.toString());

          cb.clear();
          first = false;
        }
      }
      // }} is treated as a single }
      else if (ch == '}' && i + 1 < length) {
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.