Package org.apache.aries.web.converter.impl

Examples of org.apache.aries.web.converter.impl.CaseInsensitiveMap


  }

  public URLConnection openConnection(URL url) throws IOException
  {
    // Create properties object
    CaseInsensitiveMap properties = new CaseInsensitiveMap();
    if (url.getQuery() != null)
    {
      String propString = url.getQuery();
      StringTokenizer tok = new StringTokenizer(propString);
      boolean firstProperty = true;
     
      // We now parse the property pairs query string.
      // This has the format name=value&name=value...(etc)
      while (tok.hasMoreElements())
      {
        String name = tok.nextToken("=");
        // "name" will now contain the name of the property we are trying to
        // set. Property pairs are seperated by the '&' symbol. The tokenizer
        // will include this symbol in the token so we need to return it from
        // all property names except the first.
        if (!!!firstProperty)
          name = name.substring(1);
        String value = tok.nextToken("&").substring(1);
        properties.put(name, value);
        firstProperty = false;
      }
    }
       
    return new WARConnection(new URL(url.getPath()), properties);
View Full Code Here

TOP

Related Classes of org.apache.aries.web.converter.impl.CaseInsensitiveMap

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.