Android Open Source - tribunaldroid Cookie Collection






From Project

Back to project page tribunaldroid.

License

The source code is released under:

GNU General Public License

If you think the Android project tribunaldroid listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package hu.nxu.tribunaldroid.networkComm;
//from  w w w  .j a va 2s . c om
import java.util.*;

public class CookieCollection {
  private List<Cookie> cookieList;
  
  CookieCollection()
  {
    this.cookieList = new ArrayList<Cookie>();
  }
  
  /**
   * Creates or updates a cookie.
   * @param cookie  Cookie to add or update.
   */
  public void setCookie(Cookie cookie)
  {
    for(int i = 0; i < this.cookieList.size(); ++i) {
      if (this.cookieList.get(i).Name == cookie.Name) {
        this.cookieList.get(i).Value = cookie.Value;
        return;
      }
    }
    
    this.cookieList.add(cookie);
  }
  
  public String toString()
  {
    String retVal = "";
    
    for(Cookie cookie : this.cookieList) {
      retVal += cookie.toString();
    }
    
    return retVal;
  }
}




Java Source Code List

hu.nxu.tribunaldroid.LoginActivity.java
hu.nxu.tribunaldroid.networkComm.ConnectionManager.java
hu.nxu.tribunaldroid.networkComm.CookieCollection.java
hu.nxu.tribunaldroid.networkComm.Cookie.java
hu.nxu.tribunaldroid.networkComm.GetCaptchaTask.java
hu.nxu.tribunaldroid.networkComm.HttpGetTask.java