Package anvil.core

Examples of anvil.core.AnyString


        ensureOpen(context);
        while(((b = _access.read()) != -1) && (amount-- > 0)) {
          buffer.append((char)b);
        }
        return (b == -1) && (buffer.length() == 0) ?
          NULL : new AnyString(buffer.toString());
         
      } else {
        ensureOpen(context);
        int b = _access.read();
        return (b == -1) ? NULL : Any.create(b);
View Full Code Here


        NamingEnumeration attrEnu = attrs.getAll();
        for (; attrEnu.hasMoreElements(); ) {
          Attribute a = (Attribute)attrEnu.nextElement();
          String id = a.getID();
          if (ATTRMAP_L.containsKey(a.getID())) {
            _cache.put( new AnyString((String)ATTRMAP_L.get(id)), new AnyString(a.get().toString()) );

          } else if (OTHERS_ATTR.equals(id)) {
            try {
              Array others = (Array)Serialization.unserialize(null, a.get().toString());
              _cache.union(others);
View Full Code Here

        NamingEnumeration attrEnu = attrs.getAll();
        for (; attrEnu.hasMoreElements(); ) {
          Attribute a = (Attribute)attrEnu.nextElement();
          String id = a.getID();
          if (ATTRMAP_L.containsKey(a.getID())) {
            _cache.put( new AnyString((String)ATTRMAP_L.get(id)), new AnyString(a.get().toString()) );

          } else if (OTHERS_ATTR.equals(id)) {
            try {
              Array others = (Array)Serialization.unserialize(null, a.get().toString());
              _cache.union(others);
View Full Code Here

      Address address = zone.resolve(filename);
      Module script = server.getCache().load(address).getModule();
      Product product = new Product(address, System.out, script);
      Array arguments = new Array();
      while(index < length) {
        arguments.append(new AnyString(args[index++]));
      }
      product.forge("main", arguments);
      System.exit(0);

    } catch (Exception e) {
View Full Code Here

    ApplicationPreferences app = context.address().getZone().getApplicationPreferences();
    if (app != null) {
      String[] names = app.getAdditionalPreferenceNames();
      final int n = names.length;
      for(int i=0; i<n; i++) {
        props.put(new AnyString(names[i]), Any.create(app.getPreference(names[i])));
      }
    }
    return props;
  }
View Full Code Here

    public Object nextKey()
    {
      if (_element == null) {
        _element = (Type)_enum.nextElement();
      }
      return new AnyString(_element.getName());
    }
View Full Code Here

            }
          }
        }
      }
    }
    return new AnyString(buffer.toString());
  }
View Full Code Here

    if (s != null) {
      int n = s.length;
      Any[] list = new Any[n/2];
      int j = 0;
      for(int i=0; i<n; i+=2) {
        list[j++] = new AnyString(s[i]);
      }
      return new AnyTuple(list);
    } else {
      return Any.EMPTY_TUPLE;
    }
View Full Code Here

    if (s != null) {
      int n = s.length;
      Any[] list = new Any[n/2];
      int j = 0;
      for(int i=1; i<n; i+=2) {
        list[j++] = new AnyString(s[i]);
      }
      return new AnyTuple(list);
    } else {
      return Any.EMPTY_TUPLE;
    }
View Full Code Here

    String[] s = _conf.getAdditionalPreferenceNames();
    if (s != null) {
      int n = s.length;
      Any[] list = new Any[n];
      for(int i=0; i<n; i++) {
        list[i] = new AnyString(s[i]);
      }
      return new AnyTuple(list);
    } else {
      return Any.EMPTY_TUPLE;
    }
View Full Code Here

TOP

Related Classes of anvil.core.AnyString

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.