package com.jspsmart.upload;

import java.util.Enumeration;
import java.util.Hashtable;

public class Request
{
  private Hashtable m_parameters;
  private int m_counter;

  Request()
  {
    this.m_parameters = new Hashtable();
    this.m_counter = 0;
  }

  protected void putParameter(String s, String s1)
  {
    if (s == null)
      throw new IllegalArgumentException("The name of an element cannot be null.");
    if (this.m_parameters.containsKey(s))
    {
      Hashtable hashtable = (Hashtable)(Hashtable)this.m_parameters.get(s);
      hashtable.put(new Integer(hashtable.size()), s1);
    }
    else {
      Hashtable hashtable1 = new Hashtable();
      hashtable1.put(new Integer(0), s1);
      this.m_parameters.put(s, hashtable1);
      this.m_counter += 1;
    }
  }

  public String getParameter(String s)
  {
    if (s == null)
      throw new IllegalArgumentException("Form's name is invalid or does not exist (1305).");
    Hashtable hashtable = (Hashtable)(Hashtable)this.m_parameters.get(s);
    if (hashtable == null)
      return null;

    return ((String)hashtable.get(new Integer(0)));
  }

  public Enumeration getParameterNames()
  {
    return this.m_parameters.keys();
  }

  public String[] getParameterValues(String s)
  {
    if (s == null)
      throw new IllegalArgumentException("Form's name is invalid or does not exist (1305).");
    Hashtable hashtable = (Hashtable)(Hashtable)this.m_parameters.get(s);
    if (hashtable == null)
      return null;
    String[] as = new String[hashtable.size()];
    for (int i = 0; i < hashtable.size(); ++i)
      as[i] = ((String)hashtable.get(new Integer(i)));

    return as;
  }
}
最近下载更多
sterbj  LV6 2022年1月12日
pangxiaoli  LV3 2019年7月3日
myWayne  LV7 2019年6月7日
talentwsc  LV1 2019年3月26日
空城寂  LV1 2019年1月19日
5555611  LV1 2019年1月9日
haiwen  LV19 2018年11月8日
liudeshuai970926  LV6 2018年10月29日
最代码系统管理员  LV1 2018年9月20日
mudingc木钉  LV30 2018年9月12日
最近浏览更多
java小书童  LV17 1月29日
CaoCaii  LV6 2022年6月11日
shiropurple  LV2 2022年5月8日
我不划水 2022年4月24日
暂无贡献等级
cw1984 2022年3月6日
暂无贡献等级
sterbj  LV6 2022年1月12日
lyd19931203  LV21 2021年11月15日
tangjj7260  LV18 2021年11月12日
陈佳兴  LV4 2021年10月23日
marcoreus1  LV2 2021年10月13日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友