Package com.caucho.util

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


      case '=':
        ch = read();
        if (ch == '>') {
          cb.setLength(cb.length() - 1);
          key = cb.toString().trim();
          cb.clear();
        }
        else {
          peek = ch;
        }
        break;
View Full Code Here


          elt.setAttribute(key, cb.toString());
        else if (arg != null && isFirst)
          elt.setAttribute(arg, cb.toString());
        else
          throw error(L.l("unexpected arg `{0}'", cb));
        cb.clear();
        isFirst = false;
        key = null;
        break;
      }
View Full Code Here

    Element output = xsl.createElementNS(XSLNS, "xsl:output");
    parent.appendChild(output);
    output.setAttribute("media-type", buf.toString());
    delimScanner.skip(cursor);

    buf.clear();
    delimScanner.scan(cursor, buf);
    wsScanner.skip(cursor);
    if (cursor.current() == '=' && buf.toString().equals("charset")) {
      delimScanner.skip(cursor);
      buf.clear();
View Full Code Here

    buf.clear();
    delimScanner.scan(cursor, buf);
    wsScanner.skip(cursor);
    if (cursor.current() == '=' && buf.toString().equals("charset")) {
      delimScanner.skip(cursor);
      buf.clear();
      delimScanner.scan(cursor, buf);
      if (buf.length() > 0) {
        output.setAttribute("encoding", Encoding.getMimeName(buf.toString()));
        is.setEncoding(buf.toString());
      }
View Full Code Here

      if (ch == '>')
        ch = _format.charAt(i++);
      else if (ch == '{') {
        if (cb.length() > 0)
          segments.add(new Segment(this, Segment.TEXT, cb.toString()));
        cb.clear();
        while (i < _format.length() && _format.charAt(i++) != '}')
          cb.append(_format.charAt(i - 1));
        arg = cb.toString();
        cb.clear();
View Full Code Here

          segments.add(new Segment(this, Segment.TEXT, cb.toString()));
        cb.clear();
        while (i < _format.length() && _format.charAt(i++) != '}')
          cb.append(_format.charAt(i - 1));
        arg = cb.toString();
        cb.clear();

        ch = _format.charAt(i++);
      }

      switch (ch) {
View Full Code Here

      case 'T': case 'D': case 'o':
      case 'u': case 'U':
      case 'v': case 'S':
        if (cb.length() > 0)
          segments.add(new Segment(this, Segment.TEXT, cb.toString()));
        cb.clear();
        segments.add(new Segment(this, ch, arg));
        break;

      case 't':
        if (cb.length() > 0)
View Full Code Here

        break;

      case 't':
        if (cb.length() > 0)
          segments.add(new Segment(this, Segment.TEXT, cb.toString()));
        cb.clear();
        if (arg != null)
          _timeFormat = arg;
        segments.add(new Segment(this, ch, arg));
        break;
View Full Code Here

              print((char) mode);
            }
          }

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

          // and add the results
          if (mode == ',')
View Full Code Here

          // and add the results
          if (mode == ',')
            printStringExpr(cb.toString(), elt);
          else
            stringExpr(cb.toString(), elt);
          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.