/[classpath]/inetlib/source/gnu/inet/http/Cookie.java
ViewVC logotype

Diff of /inetlib/source/gnu/inet/http/Cookie.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by dog, Thu Oct 21 15:21:55 2004 UTC revision 1.3 by dog, Thu Nov 25 22:15:05 2004 UTC
# Line 86  public class Cookie Line 86  public class Cookie
86     */     */
87    protected final Date expires;    protected final Date expires;
88    
89    public Cookie (String name, String value, String comment, String domain,    public Cookie(String name, String value, String comment, String domain,
90                   String path, boolean secure, Date expires)                  String path, boolean secure, Date expires)
91    {    {
92      this.name = name;      this.name = name;
93      this.value = value;      this.value = value;
# Line 98  public class Cookie Line 98  public class Cookie
98      this.expires = expires;      this.expires = expires;
99    }    }
100    
101    public String getName ()    public String getName()
102    {    {
103      return name;      return name;
104    }    }
105    
106    public String getValue ()    public String getValue()
107    {    {
108      return value;      return value;
109    }    }
110    
111    public String getComment ()    public String getComment()
112    {    {
113      return comment;      return comment;
114    }    }
115    
116    public String getDomain ()    public String getDomain()
117    {    {
118      return domain;      return domain;
119    }    }
120    
121    public String getPath ()    public String getPath()
122    {    {
123      return path;      return path;
124    }    }
125    
126    public boolean isSecure ()    public boolean isSecure()
127    {    {
128      return secure;      return secure;
129    }    }
130    
131    public Date getExpiryDate ()    public Date getExpiryDate()
132    {    {
133      return expires;      return expires;
134    }    }
135    
136    public String toString ()    public String toString()
137    {    {
138      return toString (true, true);      return toString(true, true);
139    }    }
140        
141    public String toString (boolean showPath, boolean showDomain)    public String toString(boolean showPath, boolean showDomain)
142    {    {
143      StringBuffer buf = new StringBuffer ();      StringBuffer buf = new StringBuffer();
144      buf.append (name);      buf.append(name);
145      buf.append ('=');      buf.append('=');
146      buf.append (value);      buf.append(value);
147      if (showPath)      if (showPath)
148        {        {
149          buf.append ("; $Path=");          buf.append("; $Path=");
150          buf.append (path);          buf.append(path);
151        }        }
152      if (showDomain)      if (showDomain)
153        {        {
154          buf.append ("; $Domain=");          buf.append("; $Domain=");
155          buf.append (domain);          buf.append(domain);
156        }        }
157      return buf.toString ();      return buf.toString();
158    }    }
159    
160  }  }
161    

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26