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