Package com.caucho.util

Examples of com.caucho.util.IntMap


    return _xmlEntities;
  }

  protected XmlEntities()
  {
    _entities = new IntMap();
    _entities.put("lt", '<');
    _entities.put("gt", '>');
    _entities.put("amp", '&');
    _entities.put("quot", '"');
    _entities.put("apos", '\'');
View Full Code Here


    }
  }

  protected HtmlEntities(double version)
  {
    _entityToChar = new IntMap();
    initLatin1();
    if (version >= 4.0) {
      initSymbol();
      initSpecial();
    }
View Full Code Here

  void addFunction(Function function)
  {
    if (functions == null) {
      functions = new ArrayList();
      funMap = new IntMap();
    }
    int pos = funMap.get(function.id);

    if (pos < 0) {
      funMap.put(function.id, functions.size());
View Full Code Here

    //compiler.setEncoding("utf8");
    Path workPath = CauchoSystem.getWorkPath();
   
    dest = workPath.lookup(name.replace('.', '/') + ".java");

    hasDispatch = new IntMap();
    staticHasDispatch = new IntMap();
    setDispatch = new IntMap();
    staticSetDispatch = new IntMap();
    methodDispatch = new IntMap();
    staticMethodDispatch = new IntMap();
    namedProperties = new HashMap();
   
    overloadDispatch = new ArrayList();

    try {
View Full Code Here

  {
    CharBuffer line = CharBuffer.allocate();
    String topId = null;
    int count = 1;
    WriteStream ws = null;
    IntMap messages = new IntMap();

    try {
      while (true) {
        do {
          line.clear();
          if (! is.readLine(line)) {
            if (ws != null)
              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);
            }
            ws.println();
          }
        } while (! line.startsWith("From "));

        if (ws != null) {
          ws.println("</message>");
          ws.close();
          ws = null;
        }


        String date = null;
        String subject = null;
        String from = null;
        String id = null;
        String references = null;

        do {
          line.clear();
          if (! is.readLine(line))
            return false;
          if (line.length() == 0)
            break;

          String lower = line.toString().toLowerCase(Locale.ENGLISH);

          if (lower.startsWith("subject: ")) {
            subject = line.substring("subject: ".length()).trim();

            if (subject.toLowerCase(Locale.ENGLISH).startsWith("re:"))
              subject = subject.substring(3).trim();
          }
          else if (lower.startsWith("from: ")) {
            from = line.substring("from: ".length());
          }
          else if (lower.startsWith("date: ")) {
            date = line.substring("from: ".length());
          }
        } while (line.length() > 0);

        int index = messages.get(subject);

        if (index >= 0) {
          ws = dst.lookup("" + index + ".xtp").openAppend();
        }
        else {
          if (subject != null && ! subject.equals(""))
            messages.put(subject, count);

          ws = dst.lookup("" + count++ + ".xtp").openWrite();
          ws.println("<title>" + subject + "</title>");
        }
        ws.println("<em>" + from + "</em>");
View Full Code Here

        return arg.toObject();

    case TO_SOURCE:
      arg = eval.getThis();
      Global.getGlobalProto().clearMark();
      IntMap map = new IntMap();

      arg.toSource(map, true);
      return arg.toSource(map, false);

    case WATCH:
View Full Code Here

      _staticClassWraps = new LruCache<Class,ESBase>(256);
      ESId.intern("foo"); // XXX: bogus to fix stupid kaffe static init.
    }
    */

    propertyMap = new IntMap();
    propertyMap.put(ESId.intern("Object"), OBJECT);
    propertyMap.put(ESId.intern("Function"), FUNCTION);
    propertyMap.put(ESId.intern("Array"), ARRAY);
    propertyMap.put(ESId.intern("String"), STRING);
    propertyMap.put(ESId.intern("Boolean"), BOOL);
View Full Code Here

    if (_const.length < constList.length)
      _const = new Value[constList.length];
   
    System.arraycopy(constList, 0, _const, 0, constList.length);

    IntMap globalNameMap = saveState.getGlobalNameMap();
    Value []globalList = saveState.getGlobalList();

    Map<String,EnvVar> oldGlobal = _globalMap;

    _globalMap = new LazySymbolMap(globalNameMap, globalList);
View Full Code Here

        continue;
      }
      // XXX: check what characters are allowed
      else if (name != null && (ch == -1 || !Character.isJavaIdentifierPart(ch))) {
        if (_parameterNameMap == null)
          _parameterNameMap = new IntMap();

        _parameterNameMap.put(name.toString(), parameterCount);

        parsedQuery.append('?');
View Full Code Here

    }
  }

  protected HtmlEntities(double version)
  {
    _entityToChar = new IntMap();
    initLatin1();
    if (version >= 4.0) {
      initSymbol();
      initSpecial();
    }
View Full Code Here

TOP

Related Classes of com.caucho.util.IntMap

Copyright © 2018 www.massapicom. 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.