1 /*
2  * Copyright (C) 2014 The Android Open Source Project
3  * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5  *
6  * This code is free software; you can redistribute it and/or modify it
7  * under the terms of the GNU General Public License version 2 only, as
8  * published by the Free Software Foundation.  Oracle designates this
9  * particular file as subject to the "Classpath" exception as provided
10  * by Oracle in the LICENSE file that accompanied this code.
11  *
12  * This code is distributed in the hope that it will be useful, but WITHOUT
13  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
15  * version 2 for more details (a copy is included in the LICENSE file that
16  * accompanied this code).
17  *
18  * You should have received a copy of the GNU General Public License version
19  * 2 along with this work; if not, write to the Free Software Foundation,
20  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
21  *
22  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
23  * or visit www.oracle.com if you need additional information or have any
24  * questions.
25  */
26 
27 package java.net;
28 
29 import android.compat.annotation.UnsupportedAppUsage;
30 
31 @SuppressWarnings({"unchecked", "deprecation", "all"})
32 public final class HttpCookie implements java.lang.Cloneable {
33 
HttpCookie(java.lang.String name, java.lang.String value)34     public HttpCookie(java.lang.String name, java.lang.String value) {
35         throw new RuntimeException("Stub!");
36     }
37 
HttpCookie(java.lang.String name, java.lang.String value, java.lang.String header)38     private HttpCookie(java.lang.String name, java.lang.String value, java.lang.String header) {
39         throw new RuntimeException("Stub!");
40     }
41 
parse(java.lang.String header)42     public static java.util.List<java.net.HttpCookie> parse(java.lang.String header) {
43         throw new RuntimeException("Stub!");
44     }
45 
parse( java.lang.String header, boolean retainHeader)46     private static java.util.List<java.net.HttpCookie> parse(
47             java.lang.String header, boolean retainHeader) {
48         throw new RuntimeException("Stub!");
49     }
50 
hasExpired()51     public boolean hasExpired() {
52         throw new RuntimeException("Stub!");
53     }
54 
setComment(java.lang.String purpose)55     public void setComment(java.lang.String purpose) {
56         throw new RuntimeException("Stub!");
57     }
58 
getComment()59     public java.lang.String getComment() {
60         throw new RuntimeException("Stub!");
61     }
62 
setCommentURL(java.lang.String purpose)63     public void setCommentURL(java.lang.String purpose) {
64         throw new RuntimeException("Stub!");
65     }
66 
getCommentURL()67     public java.lang.String getCommentURL() {
68         throw new RuntimeException("Stub!");
69     }
70 
setDiscard(boolean discard)71     public void setDiscard(boolean discard) {
72         throw new RuntimeException("Stub!");
73     }
74 
getDiscard()75     public boolean getDiscard() {
76         throw new RuntimeException("Stub!");
77     }
78 
setPortlist(java.lang.String ports)79     public void setPortlist(java.lang.String ports) {
80         throw new RuntimeException("Stub!");
81     }
82 
getPortlist()83     public java.lang.String getPortlist() {
84         throw new RuntimeException("Stub!");
85     }
86 
setDomain(java.lang.String pattern)87     public void setDomain(java.lang.String pattern) {
88         throw new RuntimeException("Stub!");
89     }
90 
getDomain()91     public java.lang.String getDomain() {
92         throw new RuntimeException("Stub!");
93     }
94 
setMaxAge(long expiry)95     public void setMaxAge(long expiry) {
96         throw new RuntimeException("Stub!");
97     }
98 
getMaxAge()99     public long getMaxAge() {
100         throw new RuntimeException("Stub!");
101     }
102 
setPath(java.lang.String uri)103     public void setPath(java.lang.String uri) {
104         throw new RuntimeException("Stub!");
105     }
106 
getPath()107     public java.lang.String getPath() {
108         throw new RuntimeException("Stub!");
109     }
110 
setSecure(boolean flag)111     public void setSecure(boolean flag) {
112         throw new RuntimeException("Stub!");
113     }
114 
getSecure()115     public boolean getSecure() {
116         throw new RuntimeException("Stub!");
117     }
118 
getName()119     public java.lang.String getName() {
120         throw new RuntimeException("Stub!");
121     }
122 
setValue(java.lang.String newValue)123     public void setValue(java.lang.String newValue) {
124         throw new RuntimeException("Stub!");
125     }
126 
getValue()127     public java.lang.String getValue() {
128         throw new RuntimeException("Stub!");
129     }
130 
getVersion()131     public int getVersion() {
132         throw new RuntimeException("Stub!");
133     }
134 
setVersion(int v)135     public void setVersion(int v) {
136         throw new RuntimeException("Stub!");
137     }
138 
isHttpOnly()139     public boolean isHttpOnly() {
140         throw new RuntimeException("Stub!");
141     }
142 
setHttpOnly(boolean httpOnly)143     public void setHttpOnly(boolean httpOnly) {
144         throw new RuntimeException("Stub!");
145     }
146 
domainMatches(java.lang.String domain, java.lang.String host)147     public static boolean domainMatches(java.lang.String domain, java.lang.String host) {
148         throw new RuntimeException("Stub!");
149     }
150 
isFullyQualifiedDomainName(java.lang.String s, int firstCharacter)151     private static boolean isFullyQualifiedDomainName(java.lang.String s, int firstCharacter) {
152         throw new RuntimeException("Stub!");
153     }
154 
toString()155     public java.lang.String toString() {
156         throw new RuntimeException("Stub!");
157     }
158 
equals(java.lang.Object obj)159     public boolean equals(java.lang.Object obj) {
160         throw new RuntimeException("Stub!");
161     }
162 
hashCode()163     public int hashCode() {
164         throw new RuntimeException("Stub!");
165     }
166 
clone()167     public java.lang.Object clone() {
168         throw new RuntimeException("Stub!");
169     }
170 
isToken(java.lang.String value)171     private static boolean isToken(java.lang.String value) {
172         throw new RuntimeException("Stub!");
173     }
174 
parseInternal( java.lang.String header, boolean retainHeader)175     private static java.net.HttpCookie parseInternal(
176             java.lang.String header, boolean retainHeader) {
177         throw new RuntimeException("Stub!");
178     }
179 
assignAttribute( java.net.HttpCookie cookie, java.lang.String attrName, java.lang.String attrValue)180     private static void assignAttribute(
181             java.net.HttpCookie cookie, java.lang.String attrName, java.lang.String attrValue) {
182         throw new RuntimeException("Stub!");
183     }
184 
header()185     private java.lang.String header() {
186         throw new RuntimeException("Stub!");
187     }
188 
toNetscapeHeaderString()189     private java.lang.String toNetscapeHeaderString() {
190         throw new RuntimeException("Stub!");
191     }
192 
toRFC2965HeaderString()193     private java.lang.String toRFC2965HeaderString() {
194         throw new RuntimeException("Stub!");
195     }
196 
guessCookieVersion(java.lang.String header)197     private static int guessCookieVersion(java.lang.String header) {
198         throw new RuntimeException("Stub!");
199     }
200 
stripOffSurroundingQuote(java.lang.String str)201     private static java.lang.String stripOffSurroundingQuote(java.lang.String str) {
202         throw new RuntimeException("Stub!");
203     }
204 
equalsIgnoreCase(java.lang.String s, java.lang.String t)205     private static boolean equalsIgnoreCase(java.lang.String s, java.lang.String t) {
206         throw new RuntimeException("Stub!");
207     }
208 
startsWithIgnoreCase(java.lang.String s, java.lang.String start)209     private static boolean startsWithIgnoreCase(java.lang.String s, java.lang.String start) {
210         throw new RuntimeException("Stub!");
211     }
212 
splitMultiCookies(java.lang.String header)213     private static java.util.List<java.lang.String> splitMultiCookies(java.lang.String header) {
214         throw new RuntimeException("Stub!");
215     }
216 
217     static final java.util.TimeZone GMT;
218 
219     static {
220         GMT = null;
221     }
222 
223     private static final long MAX_AGE_UNSPECIFIED = -1L; // 0xffffffffffffffffL
224 
225     private static final java.util.Set<java.lang.String> RESERVED_NAMES;
226 
227     static {
228         RESERVED_NAMES = null;
229     }
230 
231     private static final java.lang.String SET_COOKIE = "set-cookie:";
232 
233     private static final java.lang.String SET_COOKIE2 = "set-cookie2:";
234 
235     @UnsupportedAppUsage
236     static final java.util.Map<java.lang.String, java.net.HttpCookie.CookieAttributeAssignor>
237             assignors;
238 
239     static {
240         assignors = null;
241     }
242 
243     @UnsupportedAppUsage
244     private java.lang.String comment;
245 
246     @UnsupportedAppUsage
247     private java.lang.String commentURL;
248 
249     @UnsupportedAppUsage
250     private java.lang.String domain;
251 
252     @UnsupportedAppUsage
253     private final java.lang.String header;
254 
255     {
256         header = null;
257     }
258 
259     @UnsupportedAppUsage(
260         publicAlternatives = "Use {@link #setHttpOnly()}/{@link #isHttpOnly()} instead.")
261     private boolean httpOnly;
262 
263     @UnsupportedAppUsage
264     private long maxAge = -1L; // 0xffffffffffffffffL
265 
266     @UnsupportedAppUsage
267     private final java.lang.String name;
268 
269     {
270         name = null;
271     }
272 
273     @UnsupportedAppUsage
274     private java.lang.String path;
275 
276     @UnsupportedAppUsage
277     private java.lang.String portlist;
278 
279     @UnsupportedAppUsage
280     private boolean secure;
281 
282     @UnsupportedAppUsage
283     private boolean toDiscard;
284 
285     @UnsupportedAppUsage
286     private static final java.lang.String tspecials = ",;= \t";
287 
288     @UnsupportedAppUsage
289     private java.lang.String value;
290 
291     @UnsupportedAppUsage
292     private int version = 1; // 0x1
293 
294     @UnsupportedAppUsage
295     private final long whenCreated;
296 
297     {
298         whenCreated = 0;
299     }
300 
301     @SuppressWarnings({"unchecked", "deprecation", "all"})
302     static interface CookieAttributeAssignor {
303 
assign( java.net.HttpCookie cookie, java.lang.String attrName, java.lang.String attrValue)304         public void assign(
305                 java.net.HttpCookie cookie, java.lang.String attrName, java.lang.String attrValue);
306     }
307 }
308