Examples of ArrayDictionary


Examples of org.w3c.util.ArrayDictionary

     */

    public void pickle(DataOutputStream out, Object o)
  throws IOException
    {
  ArrayDictionary a = (ArrayDictionary) o;
  Enumeration     e = a.keys();
  int             s = a.size();
  out.writeInt(s);
  while (--s >= 0) {
      String key = (String) e.nextElement();
      out.writeUTF(key);
      out.writeUTF((String) a.get(key));
  }
    }
View Full Code Here

Examples of org.w3c.util.ArrayDictionary

    public Object unpickle (DataInputStream in)
  throws IOException
    {
  int             s = in.readInt();
  ArrayDictionary a = new ArrayDictionary(s, 5);
  while (--s >= 0) {
      String k = in.readUTF();
      String v = in.readUTF();
      a.put(k, v);
  }
  return a;
    }
View Full Code Here

Examples of org.w3c.util.ArrayDictionary

      addEnv("PATH_TRANSLATED",
       getFileResource().getFile().getAbsolutePath(), env);
  }

  //Add user env
  ArrayDictionary uenv = getUserEnv();
  if (uenv != null) {
      Enumeration names = uenv.keys();
      while (names.hasMoreElements()) {
    String var = (String)names.nextElement();
    addEnv(var, (String)uenv.get(var), env);
      }
  }
  // All other request fields, yeah, let's lose even more time:
  Enumeration e = request.enumerateHeaderDescriptions(false);
  while ( e.hasMoreElements() ) {
View Full Code Here

Examples of org.w3c.util.ArrayDictionary

     * @return a Object array
     */
    public Object unpickle(String array[]) {
  if (array.length < 1)
      return null;
  ArrayDictionary a = new ArrayDictionary(array.length, 5);
  for (int i = 0 ; i < array.length ; i++) {
      String encoded = array[i];
      int    idx     = encoded.indexOf('=');
      if (idx != -1) {
    String key     = encoded.substring(0, idx);
    String value   = encoded.substring(idx+1);
    a.put(key, value);
      }
  }
  return a;
    }
View Full Code Here

Examples of org.w3c.util.ArrayDictionary

     * Pickle an attribute array into a String array.
     * @param array the attribute array
     * @return a String array
     */
    public String[] pickle(Object o) {
  ArrayDictionary a       = (ArrayDictionary) o;
  Enumeration     e       = a.keys();
  int             len     = a.size();
  String          array[] = new String[len];

  for (int i = 0 ; i < len ; i++ ) {
      String key =  (String) e.nextElement();
      array[i]   = key+"="+(String) a.get(key);
  }
  return array;
    }
View Full Code Here

Examples of org.w3c.util.ArrayDictionary

    protected void parse()
  throws HttpParserException
    {
  ParseState ps = new ParseState(roff, rlen);

  this.params = new ArrayDictionary(4, 4);
  ps.prepare();

  // Parameters parsing
  ParseState it = new ParseState();
  it.separator  = (byte) '=';
View Full Code Here

Examples of org.w3c.util.ArrayDictionary

     */

    public void setParameter(String name, String value) {
  validate();
  if ( params == null )
      params = new ArrayDictionary(4, 4);
  params.put(name, value);
    }
View Full Code Here

Examples of org.w3c.util.ArrayDictionary

    /**
     * Servlet stub implementation - Get all init parameters.
     */
    public synchronized Enumeration getInitParameterNames() {
  // Convert init parameters to hashtable:
  ArrayDictionary d = getServletParameters();
  return (d != null) ? d.keys() : new EmptyEnumeration();
    }
View Full Code Here

Examples of org.w3c.util.ArrayDictionary

         endParam,
         parNames,parValues) ;

      buildSegments.addElement( new Segment(this,
              cmdName,
              new
              ArrayDictionary(parNames,
                  parValues),
              lastSegEnd,
              endInc)) ;
      lastSegEnd = endInc ;
View Full Code Here

Examples of org.w3c.util.ArrayDictionary

  HeaderDescription d = (HeaderDescription) factory.get(lname);
  if(d != null && d.offset >= 0) {
      values[d.offset] = value ;
  } else {
      if ( headers == null )
    headers = new ArrayDictionary(5, 5);
      headers.put(lname, value);
  }
    }
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.