jdk/src/java.base/share/classes/sun/net/www/protocol/https/HttpsURLConnectionImpl.java
author juh
Tue, 24 Mar 2015 11:31:04 -0700
changeset 29615 b0057b63b4e7
parent 29377 d3f457ce9c48
child 42351 85ed90be0ae1
permissions -rw-r--r--
8074531: Remove javax.security.cert.X509Certificate usage in internal networking packages Reviewed-by: mullan
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
29377
d3f457ce9c48 8073430: Deprecate security APIs that have been superseded
juh
parents: 26221
diff changeset
     2
 * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 1639
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 1639
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 1639
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 1639
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 1639
diff changeset
    23
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
/*
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
 * NOTE: This class lives in the package sun.net.www.protocol.https.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
 * There is a copy in com.sun.net.ssl.internal.www.protocol.https for JSSE
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
 * 1.0.2 compatibility. It is 100% identical except the package and extends
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
 * lines. Any changes should be made to be class in sun.net.* and then copied
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
 * to com.sun.net.*.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
// For both copies of the file, uncomment one line and comment the other
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
package sun.net.www.protocol.https;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
// package com.sun.net.ssl.internal.www.protocol.https;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
import java.net.URL;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
import java.net.Proxy;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
import java.net.ProtocolException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
import java.io.*;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
import javax.net.ssl.*;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
import java.security.Permission;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
import java.security.Principal;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
import java.util.Map;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
import java.util.List;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
import sun.net.www.http.HttpClient;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
/**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
 * A class to represent an HTTP connection to a remote object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
 * Ideally, this class should subclass and inherit the http handler
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
 * implementation, but it can't do so because that class have the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
 * wrong Java Type.  Thus it uses the delegate (aka, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
 * Adapter/Wrapper design pattern) to reuse code from the http
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
 * handler.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
 * Since it would use a delegate to access
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
 * sun.net.www.protocol.http.HttpURLConnection functionalities, it
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
 * needs to implement all public methods in it's super class and all
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
 * the way to Object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
// For both copies of the file, uncomment one line and comment the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
// other. The differences between the two copies are introduced for
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
// plugin, and it is marked as such.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
public class HttpsURLConnectionImpl
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
        extends javax.net.ssl.HttpsURLConnection {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
// public class HttpsURLConnectionOldImpl
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
//      extends com.sun.net.ssl.HttpsURLConnection {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
    // NOTE: made protected for plugin so that subclass can set it.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
    protected DelegateHttpsURLConnection delegate;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
// For both copies of the file, uncomment one line and comment the other
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
    HttpsURLConnectionImpl(URL u, Handler handler) throws IOException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
//    HttpsURLConnectionOldImpl(URL u, Handler handler) throws IOException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
        this(u, null, handler);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
// For both copies of the file, uncomment one line and comment the other
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
    HttpsURLConnectionImpl(URL u, Proxy p, Handler handler) throws IOException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
//    HttpsURLConnectionOldImpl(URL u, Proxy p, Handler handler) throws IOException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
        super(u);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
        delegate = new DelegateHttpsURLConnection(url, p, handler, this);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
    // NOTE: introduced for plugin
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
    // subclass needs to overwrite this to set delegate to
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
    // the appropriate delegatee
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
    protected HttpsURLConnectionImpl(URL u) throws IOException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
        super(u);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
     * Create a new HttpClient object, bypassing the cache of
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
     * HTTP client objects/connections.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
     * @param url       the URL being accessed
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
    protected void setNewClient(URL url) throws IOException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
        delegate.setNewClient(url, false);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
     * Obtain a HttpClient object. Use the cached copy if specified.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
     * @param url       the URL being accessed
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
     * @param useCache  whether the cached connection should be used
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
     *                  if present
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
    protected void setNewClient(URL url, boolean useCache)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
            throws IOException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
        delegate.setNewClient(url, useCache);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
     * Create a new HttpClient object, set up so that it uses
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
     * per-instance proxying to the given HTTP proxy.  This
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
     * bypasses the cache of HTTP client objects/connections.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
     * @param url       the URL being accessed
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
     * @param proxyHost the proxy host to use
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
     * @param proxyPort the proxy port to use
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
    protected void setProxiedClient(URL url, String proxyHost, int proxyPort)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
            throws IOException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
        delegate.setProxiedClient(url, proxyHost, proxyPort);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
     * Obtain a HttpClient object, set up so that it uses per-instance
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
     * proxying to the given HTTP proxy. Use the cached copy of HTTP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
     * client objects/connections if specified.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
     * @param url       the URL being accessed
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
     * @param proxyHost the proxy host to use
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
     * @param proxyPort the proxy port to use
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
     * @param useCache  whether the cached connection should be used
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
     *                  if present
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
    protected void setProxiedClient(URL url, String proxyHost, int proxyPort,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
            boolean useCache) throws IOException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
        delegate.setProxiedClient(url, proxyHost, proxyPort, useCache);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
     * Implements the HTTP protocol handler's "connect" method,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
     * establishing an SSL connection to the server as necessary.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
    public void connect() throws IOException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
        delegate.connect();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
     * Used by subclass to access "connected" variable.  Since we are
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
     * delegating the actual implementation to "delegate", we need to
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
     * delegate the access of "connected" as well.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
    protected boolean isConnected() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
        return delegate.isConnected();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
     * Used by subclass to access "connected" variable.  Since we are
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
     * delegating the actual implementation to "delegate", we need to
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
     * delegate the access of "connected" as well.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
    protected void setConnected(boolean conn) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
        delegate.setConnected(conn);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
     * Returns the cipher suite in use on this connection.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
    public String getCipherSuite() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
        return delegate.getCipherSuite();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
     * Returns the certificate chain the client sent to the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
     * server, or null if the client did not authenticate.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
    public java.security.cert.Certificate []
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
        getLocalCertificates() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
        return delegate.getLocalCertificates();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
     * Returns the server's certificate chain, or throws
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
     * SSLPeerUnverified Exception if
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
     * the server did not authenticate.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
    public java.security.cert.Certificate []
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
        getServerCertificates() throws SSLPeerUnverifiedException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
        return delegate.getServerCertificates();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
     * Returns the principal with which the server authenticated itself,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
     * or throw a SSLPeerUnverifiedException if the server did not authenticate.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
    public Principal getPeerPrincipal()
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
            throws SSLPeerUnverifiedException
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
    {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
        return delegate.getPeerPrincipal();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
     * Returns the principal the client sent to the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
     * server, or null if the client did not authenticate.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
    public Principal getLocalPrincipal()
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
    {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
        return delegate.getLocalPrincipal();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
    /*
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
     * Allowable input/output sequences:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
     * [interpreted as POST/PUT]
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
     * - get output, [write output,] get input, [read input]
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
     * - get output, [write output]
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
     * [interpreted as GET]
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
     * - get input, [read input]
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
     * Disallowed:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
     * - get input, [read input,] get output, [write output]
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
    public synchronized OutputStream getOutputStream() throws IOException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
        return delegate.getOutputStream();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
    public synchronized InputStream getInputStream() throws IOException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
        return delegate.getInputStream();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
    public InputStream getErrorStream() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
        return delegate.getErrorStream();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   243
     * Disconnect from the server.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   244
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   245
    public void disconnect() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   246
        delegate.disconnect();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   247
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   248
90ce3da70b43 Initial load
duke
parents:
diff changeset
   249
    public boolean usingProxy() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   250
        return delegate.usingProxy();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   251
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   252
90ce3da70b43 Initial load
duke
parents:
diff changeset
   253
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   254
     * Returns an unmodifiable Map of the header fields.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   255
     * The Map keys are Strings that represent the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   256
     * response-header field names. Each Map value is an
90ce3da70b43 Initial load
duke
parents:
diff changeset
   257
     * unmodifiable List of Strings that represents
90ce3da70b43 Initial load
duke
parents:
diff changeset
   258
     * the corresponding field values.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   259
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   260
     * @return a Map of header fields
90ce3da70b43 Initial load
duke
parents:
diff changeset
   261
     * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
   262
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   263
    public Map<String,List<String>> getHeaderFields() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   264
        return delegate.getHeaderFields();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   265
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   266
90ce3da70b43 Initial load
duke
parents:
diff changeset
   267
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   268
     * Gets a header field by name. Returns null if not known.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   269
     * @param name the name of the header field
90ce3da70b43 Initial load
duke
parents:
diff changeset
   270
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   271
    public String getHeaderField(String name) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   272
        return delegate.getHeaderField(name);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   273
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   274
90ce3da70b43 Initial load
duke
parents:
diff changeset
   275
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   276
     * Gets a header field by index. Returns null if not known.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   277
     * @param n the index of the header field
90ce3da70b43 Initial load
duke
parents:
diff changeset
   278
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   279
    public String getHeaderField(int n) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   280
        return delegate.getHeaderField(n);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   281
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   282
90ce3da70b43 Initial load
duke
parents:
diff changeset
   283
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   284
     * Gets a header field by index. Returns null if not known.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   285
     * @param n the index of the header field
90ce3da70b43 Initial load
duke
parents:
diff changeset
   286
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   287
    public String getHeaderFieldKey(int n) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   288
        return delegate.getHeaderFieldKey(n);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   289
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   290
90ce3da70b43 Initial load
duke
parents:
diff changeset
   291
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   292
     * Sets request property. If a property with the key already
90ce3da70b43 Initial load
duke
parents:
diff changeset
   293
     * exists, overwrite its value with the new value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   294
     * @param value the value to be set
90ce3da70b43 Initial load
duke
parents:
diff changeset
   295
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   296
    public void setRequestProperty(String key, String value) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   297
        delegate.setRequestProperty(key, value);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   298
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   299
90ce3da70b43 Initial load
duke
parents:
diff changeset
   300
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   301
     * Adds a general request property specified by a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   302
     * key-value pair.  This method will not overwrite
90ce3da70b43 Initial load
duke
parents:
diff changeset
   303
     * existing values associated with the same key.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   304
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   305
     * @param   key     the keyword by which the request is known
90ce3da70b43 Initial load
duke
parents:
diff changeset
   306
     *                  (e.g., "<code>accept</code>").
90ce3da70b43 Initial load
duke
parents:
diff changeset
   307
     * @param   value  the value associated with it.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   308
     * @see #getRequestProperties(java.lang.String)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   309
     * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
   310
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   311
    public void addRequestProperty(String key, String value) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   312
        delegate.addRequestProperty(key, value);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   313
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   314
90ce3da70b43 Initial load
duke
parents:
diff changeset
   315
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   316
     * Overwrite super class method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   317
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   318
    public int getResponseCode() throws IOException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   319
        return delegate.getResponseCode();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   320
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   321
90ce3da70b43 Initial load
duke
parents:
diff changeset
   322
    public String getRequestProperty(String key) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   323
        return delegate.getRequestProperty(key);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   324
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   325
90ce3da70b43 Initial load
duke
parents:
diff changeset
   326
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   327
     * Returns an unmodifiable Map of general request
90ce3da70b43 Initial load
duke
parents:
diff changeset
   328
     * properties for this connection. The Map keys
90ce3da70b43 Initial load
duke
parents:
diff changeset
   329
     * are Strings that represent the request-header
90ce3da70b43 Initial load
duke
parents:
diff changeset
   330
     * field names. Each Map value is a unmodifiable List
90ce3da70b43 Initial load
duke
parents:
diff changeset
   331
     * of Strings that represents the corresponding
90ce3da70b43 Initial load
duke
parents:
diff changeset
   332
     * field values.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   333
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   334
     * @return  a Map of the general request properties for this connection.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   335
     * @throws IllegalStateException if already connected
90ce3da70b43 Initial load
duke
parents:
diff changeset
   336
     * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
   337
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   338
    public Map<String,List<String>> getRequestProperties() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   339
        return delegate.getRequestProperties();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   340
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   341
90ce3da70b43 Initial load
duke
parents:
diff changeset
   342
    /*
90ce3da70b43 Initial load
duke
parents:
diff changeset
   343
     * We support JDK 1.2.x so we can't count on these from JDK 1.3.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   344
     * We override and supply our own version.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   345
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   346
    public void setInstanceFollowRedirects(boolean shouldFollow) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   347
        delegate.setInstanceFollowRedirects(shouldFollow);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   348
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   349
90ce3da70b43 Initial load
duke
parents:
diff changeset
   350
    public boolean getInstanceFollowRedirects() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   351
        return delegate.getInstanceFollowRedirects();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   352
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   353
90ce3da70b43 Initial load
duke
parents:
diff changeset
   354
    public void setRequestMethod(String method) throws ProtocolException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   355
        delegate.setRequestMethod(method);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   356
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   357
90ce3da70b43 Initial load
duke
parents:
diff changeset
   358
    public String getRequestMethod() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   359
        return delegate.getRequestMethod();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   360
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   361
90ce3da70b43 Initial load
duke
parents:
diff changeset
   362
    public String getResponseMessage() throws IOException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   363
        return delegate.getResponseMessage();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   364
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   365
90ce3da70b43 Initial load
duke
parents:
diff changeset
   366
    public long getHeaderFieldDate(String name, long Default) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   367
        return delegate.getHeaderFieldDate(name, Default);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   368
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   369
90ce3da70b43 Initial load
duke
parents:
diff changeset
   370
    public Permission getPermission() throws IOException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   371
        return delegate.getPermission();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   372
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   373
90ce3da70b43 Initial load
duke
parents:
diff changeset
   374
    public URL getURL() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   375
        return delegate.getURL();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   376
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   377
90ce3da70b43 Initial load
duke
parents:
diff changeset
   378
    public int getContentLength() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   379
        return delegate.getContentLength();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   380
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   381
90ce3da70b43 Initial load
duke
parents:
diff changeset
   382
    public long getContentLengthLong() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   383
        return delegate.getContentLengthLong();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   384
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   385
90ce3da70b43 Initial load
duke
parents:
diff changeset
   386
    public String getContentType() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   387
        return delegate.getContentType();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   388
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   389
90ce3da70b43 Initial load
duke
parents:
diff changeset
   390
    public String getContentEncoding() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   391
        return delegate.getContentEncoding();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   392
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   393
90ce3da70b43 Initial load
duke
parents:
diff changeset
   394
    public long getExpiration() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   395
        return delegate.getExpiration();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   396
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   397
90ce3da70b43 Initial load
duke
parents:
diff changeset
   398
    public long getDate() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   399
        return delegate.getDate();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   400
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   401
90ce3da70b43 Initial load
duke
parents:
diff changeset
   402
    public long getLastModified() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   403
        return delegate.getLastModified();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   404
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   405
90ce3da70b43 Initial load
duke
parents:
diff changeset
   406
    public int getHeaderFieldInt(String name, int Default) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   407
        return delegate.getHeaderFieldInt(name, Default);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   408
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   409
90ce3da70b43 Initial load
duke
parents:
diff changeset
   410
    public long getHeaderFieldLong(String name, long Default) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   411
        return delegate.getHeaderFieldLong(name, Default);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   412
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   413
90ce3da70b43 Initial load
duke
parents:
diff changeset
   414
    public Object getContent() throws IOException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   415
        return delegate.getContent();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   416
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   417
20754
3d7b2fafc34b 8025967: addition of -Werror broke the old build
valeriep
parents: 5506
diff changeset
   418
    @SuppressWarnings("rawtypes")
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   419
    public Object getContent(Class[] classes) throws IOException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   420
        return delegate.getContent(classes);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   421
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   422
90ce3da70b43 Initial load
duke
parents:
diff changeset
   423
    public String toString() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   424
        return delegate.toString();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   425
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   426
90ce3da70b43 Initial load
duke
parents:
diff changeset
   427
    public void setDoInput(boolean doinput) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   428
        delegate.setDoInput(doinput);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   429
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   430
90ce3da70b43 Initial load
duke
parents:
diff changeset
   431
    public boolean getDoInput() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   432
        return delegate.getDoInput();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   433
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   434
90ce3da70b43 Initial load
duke
parents:
diff changeset
   435
    public void setDoOutput(boolean dooutput) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   436
        delegate.setDoOutput(dooutput);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   437
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   438
90ce3da70b43 Initial load
duke
parents:
diff changeset
   439
    public boolean getDoOutput() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   440
        return delegate.getDoOutput();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   441
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   442
90ce3da70b43 Initial load
duke
parents:
diff changeset
   443
    public void setAllowUserInteraction(boolean allowuserinteraction) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   444
        delegate.setAllowUserInteraction(allowuserinteraction);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   445
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   446
90ce3da70b43 Initial load
duke
parents:
diff changeset
   447
    public boolean getAllowUserInteraction() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   448
        return delegate.getAllowUserInteraction();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   449
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   450
90ce3da70b43 Initial load
duke
parents:
diff changeset
   451
    public void setUseCaches(boolean usecaches) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   452
        delegate.setUseCaches(usecaches);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   453
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   454
90ce3da70b43 Initial load
duke
parents:
diff changeset
   455
    public boolean getUseCaches() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   456
        return delegate.getUseCaches();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   457
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   458
90ce3da70b43 Initial load
duke
parents:
diff changeset
   459
    public void setIfModifiedSince(long ifmodifiedsince) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   460
        delegate.setIfModifiedSince(ifmodifiedsince);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   461
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   462
90ce3da70b43 Initial load
duke
parents:
diff changeset
   463
    public long getIfModifiedSince() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   464
        return delegate.getIfModifiedSince();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   465
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   466
90ce3da70b43 Initial load
duke
parents:
diff changeset
   467
    public boolean getDefaultUseCaches() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   468
        return delegate.getDefaultUseCaches();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   469
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   470
90ce3da70b43 Initial load
duke
parents:
diff changeset
   471
    public void setDefaultUseCaches(boolean defaultusecaches) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   472
        delegate.setDefaultUseCaches(defaultusecaches);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   473
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   474
90ce3da70b43 Initial load
duke
parents:
diff changeset
   475
    /*
90ce3da70b43 Initial load
duke
parents:
diff changeset
   476
     * finalize (dispose) the delegated object.  Otherwise
90ce3da70b43 Initial load
duke
parents:
diff changeset
   477
     * sun.net.www.protocol.http.HttpURLConnection's finalize()
90ce3da70b43 Initial load
duke
parents:
diff changeset
   478
     * would have to be made public.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   479
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   480
    protected void finalize() throws Throwable {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   481
        delegate.dispose();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   482
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   483
90ce3da70b43 Initial load
duke
parents:
diff changeset
   484
    public boolean equals(Object obj) {
26221
47fd8b933a5c 8055299: HttpsURLConnection.equals() broken
michaelm
parents: 25859
diff changeset
   485
        return this == obj || ((obj instanceof HttpsURLConnectionImpl) &&
47fd8b933a5c 8055299: HttpsURLConnection.equals() broken
michaelm
parents: 25859
diff changeset
   486
            delegate.equals(((HttpsURLConnectionImpl)obj).delegate));
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   487
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   488
90ce3da70b43 Initial load
duke
parents:
diff changeset
   489
    public int hashCode() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   490
        return delegate.hashCode();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   491
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   492
90ce3da70b43 Initial load
duke
parents:
diff changeset
   493
    public void setConnectTimeout(int timeout) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   494
        delegate.setConnectTimeout(timeout);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   495
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   496
90ce3da70b43 Initial load
duke
parents:
diff changeset
   497
    public int getConnectTimeout() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   498
        return delegate.getConnectTimeout();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   499
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   500
90ce3da70b43 Initial load
duke
parents:
diff changeset
   501
    public void setReadTimeout(int timeout) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   502
        delegate.setReadTimeout(timeout);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   503
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   504
90ce3da70b43 Initial load
duke
parents:
diff changeset
   505
    public int getReadTimeout() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   506
        return delegate.getReadTimeout();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   507
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   508
90ce3da70b43 Initial load
duke
parents:
diff changeset
   509
    public void setFixedLengthStreamingMode (int contentLength) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   510
        delegate.setFixedLengthStreamingMode(contentLength);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   511
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   512
1576
b697b141012d 6755625: Add HttpURLConnection.setFixedLengthStreamingMode(long)
chegar
parents: 2
diff changeset
   513
    public void setFixedLengthStreamingMode(long contentLength) {
b697b141012d 6755625: Add HttpURLConnection.setFixedLengthStreamingMode(long)
chegar
parents: 2
diff changeset
   514
        delegate.setFixedLengthStreamingMode(contentLength);
b697b141012d 6755625: Add HttpURLConnection.setFixedLengthStreamingMode(long)
chegar
parents: 2
diff changeset
   515
    }
b697b141012d 6755625: Add HttpURLConnection.setFixedLengthStreamingMode(long)
chegar
parents: 2
diff changeset
   516
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   517
    public void setChunkedStreamingMode (int chunklen) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   518
        delegate.setChunkedStreamingMode(chunklen);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   519
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   520
}