@@ -0,0 +1,3736 @@
+/* Licensed to the Apache Software Foundation (ASF) under one or more%0A * contributor license agreements.  See the NOTICE file distributed with%0A * this work for additional information regarding copyright ownership.%0A * The ASF licenses this file to You under the Apache License, Version 2.0%0A * (the %22License%22); you may not use this file except in compliance with%0A * the License.  You may obtain a copy of the License at%0A * %0A *     http://www.apache.org/licenses/LICENSE-2.0%0A * %0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A%0Apackage java.net;%0A%0Aimport java.util.List;%0A%0A/**%0A * A CookieStore object is a repository for cookies.%0A * %0A * CookieManager will store cookies of every incoming HTTP response into%0A * CookieStore, and retrieve cookies for every outgoing HTTP request.Expired%0A * HttpCookies should be removed from this store by themselves.%0A * %0A * @since 1.6%0A */%0Apublic interface CookieStore %7B%0A%0A    /**%0A     * Saves a HTTP cookie to this store. This is called for every incoming HTTP%0A     * response.%0A     * %0A     * A cookie may or may not has an associated URI. If not, the cookie's%0A     * domain and path attribute will show cradleland. If there is an%0A     * associated URI and no domain and path attribute are speicifed for the%0A     * cookie, the given URI will indicate where this cookie comes from.%0A     * %0A     * If a cookie corresponding to the given URI already exists, then it is%0A     * replaced with the new one.%0A     * %0A     * @param uri%0A     *            the uri associated with the specified cookie. A null value%0A     *            indicates the cookie is not associated with a URI%0A     * @param cookie%0A     *            the cookie to be stored%0A     */%0A    void add(URI uri, HttpCookie cookie);%0A%0A    /**%0A     * Retrieves cookies that match the specified URI. Return not expired cookies.%0A     * For every outgoing HTTP request, this method will be called.%0A     * %0A     * @param uri%0A     *            the uri this cookie associated with. If null, this cookie will%0A     *            not be associated with an URI%0A     * @return an immutable list of HttpCookies, return empty list if no cookies%0A     *         match the given URI%0A     * @throws NullPointerException%0A     *             if uri is null%0A     */%0A    List%3CHttpCookie%3E get(URI uri);%0A%0A    /**%0A     * Get all cookies in cookie store which are not expired.%0A     * %0A     * @return an empty list if there's no http cookie in store, or an immutable%0A     *         list of cookies%0A     */%0A    List%3CHttpCookie%3E getCookies();%0A%0A    /**%0A     * Get a set of URIs, which is composed of associated URI with all the%0A     * cookies in the store.%0A     * %0A     * @return zero-length list if no cookie in the store is associated with any%0A     *         URIs, otherwise an immutable list of URIs.%0A     */%0A    List%3CURI%3E getURIs();%0A%0A    /**%0A     * Remove the specified cookie from the store.%0A     * %0A     * @param uri%0A     *            the uri associated with the specified cookie. If the cookie is%0A     *            not associated with an URI when added, uri should be null;%0A     *            otherwise the uri should be non-null.%0A     * @param cookie%0A     *            the cookie to be removed%0A     * @return true if the specified cookie is contained in this store and%0A     *         removed successfully%0A     */%0A    boolean remove(URI uri, HttpCookie cookie);%0A%0A    /**%0A     * Clear this cookie store.%0A     * %0A     * @return true if all the stored cookies have been removed%0A     */%0A    boolean removeAll();%0A%7D%0A

Apply patch for HARMONY-4099 ([classlib][luni][java6] New Interface java.net.CookieStore for java6)