src/java.base/share/classes/sun/net/www/protocol/https/HttpsURLConnectionImpl.java
author michaelm
Wed, 13 Nov 2019 09:09:41 +0000
changeset 59047 6c78185c99d7
parent 55711 0c143aaa2c99
permissions -rw-r--r--
8233958: Memory retention due to HttpsURLConnection finalizer that serves no purpose Reviewed-by: dfuchs, rriggs
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
53972
43c2ab1bdfd3 8215430: Remove the internal package com.sun.net.ssl
xuelei
parents: 52474
diff changeset
     2
 * Copyright (c) 2001, 2019, 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
package sun.net.www.protocol.https;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
import java.net.URL;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
import java.net.Proxy;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
import java.net.ProtocolException;
47411
45a84b0b59b9 8176751: Better URL connections
dfuchs
parents: 47216
diff changeset
    31
import java.net.MalformedURLException;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
import java.io.*;
42351
85ed90be0ae1 8169495: Add a method to set an Authenticator on a HttpURLConnection.
dfuchs
parents: 29615
diff changeset
    33
import java.net.Authenticator;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
import javax.net.ssl.*;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
import java.security.Permission;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
import java.security.Principal;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
import java.util.Map;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
import java.util.List;
52474
13266dac5fdb 8212261: Add SSLSession accessors to HttpsURLConnection and SecureCacheResponse
xuelei
parents: 47411
diff changeset
    39
import java.util.Optional;
55711
0c143aaa2c99 8221518: Normalize normalization
dfuchs
parents: 54443
diff changeset
    40
import sun.net.util.IPAddressUtil;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
import sun.net.www.http.HttpClient;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
/**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
 * A class to represent an HTTP connection to a remote object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
 * Ideally, this class should subclass and inherit the http handler
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
 * implementation, but it can't do so because that class have the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
 * wrong Java Type.  Thus it uses the delegate (aka, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
 * Adapter/Wrapper design pattern) to reuse code from the http
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
 * handler.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
 * Since it would use a delegate to access
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
 * sun.net.www.protocol.http.HttpURLConnection functionalities, it
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
 * needs to implement all public methods in it's super class and all
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
 * the way to Object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
public class HttpsURLConnectionImpl
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
        extends javax.net.ssl.HttpsURLConnection {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
54443
dfba4e321ab3 8221882: Use fiber-friendly java.util.concurrent.locks in JSSE
xuelei
parents: 53972
diff changeset
    61
    private final DelegateHttpsURLConnection delegate;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
    HttpsURLConnectionImpl(URL u, Handler handler) throws IOException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
        this(u, null, handler);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
47411
45a84b0b59b9 8176751: Better URL connections
dfuchs
parents: 47216
diff changeset
    67
    static URL checkURL(URL u) throws IOException {
45a84b0b59b9 8176751: Better URL connections
dfuchs
parents: 47216
diff changeset
    68
        if (u != null) {
45a84b0b59b9 8176751: Better URL connections
dfuchs
parents: 47216
diff changeset
    69
            if (u.toExternalForm().indexOf('\n') > -1) {
45a84b0b59b9 8176751: Better URL connections
dfuchs
parents: 47216
diff changeset
    70
                throw new MalformedURLException("Illegal character in URL");
45a84b0b59b9 8176751: Better URL connections
dfuchs
parents: 47216
diff changeset
    71
            }
45a84b0b59b9 8176751: Better URL connections
dfuchs
parents: 47216
diff changeset
    72
        }
55711
0c143aaa2c99 8221518: Normalize normalization
dfuchs
parents: 54443
diff changeset
    73
        String s = IPAddressUtil.checkAuthority(u);
0c143aaa2c99 8221518: Normalize normalization
dfuchs
parents: 54443
diff changeset
    74
        if (s != null) {
0c143aaa2c99 8221518: Normalize normalization
dfuchs
parents: 54443
diff changeset
    75
            throw new MalformedURLException(s);
0c143aaa2c99 8221518: Normalize normalization
dfuchs
parents: 54443
diff changeset
    76
        }
47411
45a84b0b59b9 8176751: Better URL connections
dfuchs
parents: 47216
diff changeset
    77
        return u;
45a84b0b59b9 8176751: Better URL connections
dfuchs
parents: 47216
diff changeset
    78
    }
53972
43c2ab1bdfd3 8215430: Remove the internal package com.sun.net.ssl
xuelei
parents: 52474
diff changeset
    79
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
    HttpsURLConnectionImpl(URL u, Proxy p, Handler handler) throws IOException {
47411
45a84b0b59b9 8176751: Better URL connections
dfuchs
parents: 47216
diff changeset
    81
        super(checkURL(u));
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
        delegate = new DelegateHttpsURLConnection(url, p, handler, this);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
     * Create a new HttpClient object, bypassing the cache of
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
     * HTTP client objects/connections.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
     * @param url       the URL being accessed
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
    protected void setNewClient(URL url) throws IOException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
        delegate.setNewClient(url, false);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
     * Obtain a HttpClient object. Use the cached copy if specified.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
     * @param url       the URL being accessed
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
     * @param useCache  whether the cached connection should be used
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
     *                  if present
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
    protected void setNewClient(URL url, boolean useCache)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
            throws IOException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
        delegate.setNewClient(url, useCache);
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
     * Create a new HttpClient object, set up so that it uses
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
     * per-instance proxying to the given HTTP proxy.  This
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
     * bypasses the cache of HTTP client objects/connections.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
     * @param url       the URL being accessed
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
     * @param proxyHost the proxy host to use
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
     * @param proxyPort the proxy port to use
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
    protected void setProxiedClient(URL url, String proxyHost, int proxyPort)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
            throws IOException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
        delegate.setProxiedClient(url, proxyHost, proxyPort);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
     * Obtain a HttpClient object, set up so that it uses per-instance
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
     * proxying to the given HTTP proxy. Use the cached copy of HTTP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
     * client objects/connections if specified.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
     * @param url       the URL being accessed
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
     * @param proxyHost the proxy host to use
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
     * @param proxyPort the proxy port to use
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
     * @param useCache  whether the cached connection should be used
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
     *                  if present
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
    protected void setProxiedClient(URL url, String proxyHost, int proxyPort,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
            boolean useCache) throws IOException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
        delegate.setProxiedClient(url, proxyHost, proxyPort, useCache);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
     * Implements the HTTP protocol handler's "connect" method,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
     * establishing an SSL connection to the server as necessary.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
    public void connect() throws IOException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
        delegate.connect();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
     * Used by subclass to access "connected" variable.  Since we are
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
     * delegating the actual implementation to "delegate", we need to
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
     * delegate the access of "connected" as well.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
    protected boolean isConnected() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
        return delegate.isConnected();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
     * Used by subclass to access "connected" variable.  Since we are
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
     * delegating the actual implementation to "delegate", we need to
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
     * delegate the access of "connected" as well.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
    protected void setConnected(boolean conn) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
        delegate.setConnected(conn);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
     * Returns the cipher suite in use on this connection.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
    public String getCipherSuite() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
        return delegate.getCipherSuite();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
     * Returns the certificate chain the client sent to the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
     * server, or null if the client did not authenticate.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
    public java.security.cert.Certificate []
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
        getLocalCertificates() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
        return delegate.getLocalCertificates();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
     * Returns the server's certificate chain, or throws
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
     * SSLPeerUnverified Exception if
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
     * the server did not authenticate.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
    public java.security.cert.Certificate []
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
        getServerCertificates() throws SSLPeerUnverifiedException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
        return delegate.getServerCertificates();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
     * Returns the principal with which the server authenticated itself,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
     * or throw a SSLPeerUnverifiedException if the server did not authenticate.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
    public Principal getPeerPrincipal()
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
            throws SSLPeerUnverifiedException
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
    {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
        return delegate.getPeerPrincipal();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
     * Returns the principal the client sent to the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
     * server, or null if the client did not authenticate.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
    public Principal getLocalPrincipal()
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
    {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
        return delegate.getLocalPrincipal();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
    /*
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
     * Allowable input/output sequences:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
     * [interpreted as POST/PUT]
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
     * - get output, [write output,] get input, [read input]
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
     * - get output, [write output]
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
     * [interpreted as GET]
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
     * - get input, [read input]
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
     * Disallowed:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
     * - get input, [read input,] get output, [write output]
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
54443
dfba4e321ab3 8221882: Use fiber-friendly java.util.concurrent.locks in JSSE
xuelei
parents: 53972
diff changeset
   219
    public OutputStream getOutputStream() throws IOException {
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
        return delegate.getOutputStream();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
54443
dfba4e321ab3 8221882: Use fiber-friendly java.util.concurrent.locks in JSSE
xuelei
parents: 53972
diff changeset
   223
    public InputStream getInputStream() throws IOException {
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
        return delegate.getInputStream();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
    public InputStream getErrorStream() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
        return delegate.getErrorStream();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
     * Disconnect from the server.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
    public void disconnect() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
        delegate.disconnect();
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 boolean usingProxy() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
        return delegate.usingProxy();
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
     * Returns an unmodifiable Map of the header fields.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   244
     * The Map keys are Strings that represent the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   245
     * response-header field names. Each Map value is an
90ce3da70b43 Initial load
duke
parents:
diff changeset
   246
     * unmodifiable List of Strings that represents
90ce3da70b43 Initial load
duke
parents:
diff changeset
   247
     * the corresponding field values.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   248
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   249
     * @return a Map of header fields
90ce3da70b43 Initial load
duke
parents:
diff changeset
   250
     * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
   251
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   252
    public Map<String,List<String>> getHeaderFields() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   253
        return delegate.getHeaderFields();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   254
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   255
90ce3da70b43 Initial load
duke
parents:
diff changeset
   256
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   257
     * Gets a header field by name. Returns null if not known.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   258
     * @param name the name of the header field
90ce3da70b43 Initial load
duke
parents:
diff changeset
   259
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   260
    public String getHeaderField(String name) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   261
        return delegate.getHeaderField(name);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   262
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   263
90ce3da70b43 Initial load
duke
parents:
diff changeset
   264
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   265
     * Gets a header field by index. Returns null if not known.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   266
     * @param n the index of the header field
90ce3da70b43 Initial load
duke
parents:
diff changeset
   267
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   268
    public String getHeaderField(int n) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   269
        return delegate.getHeaderField(n);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   270
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   271
90ce3da70b43 Initial load
duke
parents:
diff changeset
   272
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   273
     * Gets a header field by index. Returns null if not known.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   274
     * @param n the index of the header field
90ce3da70b43 Initial load
duke
parents:
diff changeset
   275
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   276
    public String getHeaderFieldKey(int n) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   277
        return delegate.getHeaderFieldKey(n);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   278
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   279
90ce3da70b43 Initial load
duke
parents:
diff changeset
   280
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   281
     * Sets request property. If a property with the key already
90ce3da70b43 Initial load
duke
parents:
diff changeset
   282
     * exists, overwrite its value with the new value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   283
     * @param value the value to be set
90ce3da70b43 Initial load
duke
parents:
diff changeset
   284
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   285
    public void setRequestProperty(String key, String value) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   286
        delegate.setRequestProperty(key, value);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   287
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   288
90ce3da70b43 Initial load
duke
parents:
diff changeset
   289
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   290
     * Adds a general request property specified by a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   291
     * key-value pair.  This method will not overwrite
90ce3da70b43 Initial load
duke
parents:
diff changeset
   292
     * existing values associated with the same key.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   293
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   294
     * @param   key     the keyword by which the request is known
90ce3da70b43 Initial load
duke
parents:
diff changeset
   295
     *                  (e.g., "<code>accept</code>").
90ce3da70b43 Initial load
duke
parents:
diff changeset
   296
     * @param   value  the value associated with it.
55711
0c143aaa2c99 8221518: Normalize normalization
dfuchs
parents: 54443
diff changeset
   297
     * @see #getRequestProperty(java.lang.String)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   298
     * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
   299
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   300
    public void addRequestProperty(String key, String value) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   301
        delegate.addRequestProperty(key, value);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   302
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   303
90ce3da70b43 Initial load
duke
parents:
diff changeset
   304
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   305
     * Overwrite super class method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   306
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   307
    public int getResponseCode() throws IOException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   308
        return delegate.getResponseCode();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   309
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   310
90ce3da70b43 Initial load
duke
parents:
diff changeset
   311
    public String getRequestProperty(String key) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   312
        return delegate.getRequestProperty(key);
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
     * Returns an unmodifiable Map of general request
90ce3da70b43 Initial load
duke
parents:
diff changeset
   317
     * properties for this connection. The Map keys
90ce3da70b43 Initial load
duke
parents:
diff changeset
   318
     * are Strings that represent the request-header
90ce3da70b43 Initial load
duke
parents:
diff changeset
   319
     * field names. Each Map value is a unmodifiable List
90ce3da70b43 Initial load
duke
parents:
diff changeset
   320
     * of Strings that represents the corresponding
90ce3da70b43 Initial load
duke
parents:
diff changeset
   321
     * field values.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   322
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   323
     * @return  a Map of the general request properties for this connection.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   324
     * @throws IllegalStateException if already connected
90ce3da70b43 Initial load
duke
parents:
diff changeset
   325
     * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
   326
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   327
    public Map<String,List<String>> getRequestProperties() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   328
        return delegate.getRequestProperties();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   329
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   330
90ce3da70b43 Initial load
duke
parents:
diff changeset
   331
    /*
90ce3da70b43 Initial load
duke
parents:
diff changeset
   332
     * We support JDK 1.2.x so we can't count on these from JDK 1.3.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   333
     * We override and supply our own version.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   334
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   335
    public void setInstanceFollowRedirects(boolean shouldFollow) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   336
        delegate.setInstanceFollowRedirects(shouldFollow);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   337
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   338
90ce3da70b43 Initial load
duke
parents:
diff changeset
   339
    public boolean getInstanceFollowRedirects() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   340
        return delegate.getInstanceFollowRedirects();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   341
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   342
90ce3da70b43 Initial load
duke
parents:
diff changeset
   343
    public void setRequestMethod(String method) throws ProtocolException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   344
        delegate.setRequestMethod(method);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   345
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   346
90ce3da70b43 Initial load
duke
parents:
diff changeset
   347
    public String getRequestMethod() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   348
        return delegate.getRequestMethod();
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 String getResponseMessage() throws IOException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   352
        return delegate.getResponseMessage();
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 long getHeaderFieldDate(String name, long Default) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   356
        return delegate.getHeaderFieldDate(name, Default);
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 Permission getPermission() throws IOException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   360
        return delegate.getPermission();
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 URL getURL() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   364
        return delegate.getURL();
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 int getContentLength() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   368
        return delegate.getContentLength();
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 long getContentLengthLong() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   372
        return delegate.getContentLengthLong();
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 String getContentType() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   376
        return delegate.getContentType();
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 String getContentEncoding() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   380
        return delegate.getContentEncoding();
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 getExpiration() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   384
        return delegate.getExpiration();
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 long getDate() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   388
        return delegate.getDate();
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 long getLastModified() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   392
        return delegate.getLastModified();
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 int getHeaderFieldInt(String name, int Default) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   396
        return delegate.getHeaderFieldInt(name, Default);
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 getHeaderFieldLong(String name, long Default) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   400
        return delegate.getHeaderFieldLong(name, Default);
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 Object getContent() throws IOException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   404
        return delegate.getContent();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   405
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   406
20754
3d7b2fafc34b 8025967: addition of -Werror broke the old build
valeriep
parents: 5506
diff changeset
   407
    @SuppressWarnings("rawtypes")
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   408
    public Object getContent(Class[] classes) throws IOException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   409
        return delegate.getContent(classes);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   410
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   411
90ce3da70b43 Initial load
duke
parents:
diff changeset
   412
    public String toString() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   413
        return delegate.toString();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   414
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   415
90ce3da70b43 Initial load
duke
parents:
diff changeset
   416
    public void setDoInput(boolean doinput) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   417
        delegate.setDoInput(doinput);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   418
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   419
90ce3da70b43 Initial load
duke
parents:
diff changeset
   420
    public boolean getDoInput() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   421
        return delegate.getDoInput();
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 void setDoOutput(boolean dooutput) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   425
        delegate.setDoOutput(dooutput);
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 boolean getDoOutput() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   429
        return delegate.getDoOutput();
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 void setAllowUserInteraction(boolean allowuserinteraction) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   433
        delegate.setAllowUserInteraction(allowuserinteraction);
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 boolean getAllowUserInteraction() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   437
        return delegate.getAllowUserInteraction();
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 void setUseCaches(boolean usecaches) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   441
        delegate.setUseCaches(usecaches);
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 boolean getUseCaches() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   445
        return delegate.getUseCaches();
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 void setIfModifiedSince(long ifmodifiedsince) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   449
        delegate.setIfModifiedSince(ifmodifiedsince);
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 long getIfModifiedSince() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   453
        return delegate.getIfModifiedSince();
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 getDefaultUseCaches() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   457
        return delegate.getDefaultUseCaches();
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 setDefaultUseCaches(boolean defaultusecaches) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   461
        delegate.setDefaultUseCaches(defaultusecaches);
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 boolean equals(Object obj) {
26221
47fd8b933a5c 8055299: HttpsURLConnection.equals() broken
michaelm
parents: 25859
diff changeset
   465
        return this == obj || ((obj instanceof HttpsURLConnectionImpl) &&
47fd8b933a5c 8055299: HttpsURLConnection.equals() broken
michaelm
parents: 25859
diff changeset
   466
            delegate.equals(((HttpsURLConnectionImpl)obj).delegate));
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   467
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   468
90ce3da70b43 Initial load
duke
parents:
diff changeset
   469
    public int hashCode() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   470
        return delegate.hashCode();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   471
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   472
90ce3da70b43 Initial load
duke
parents:
diff changeset
   473
    public void setConnectTimeout(int timeout) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   474
        delegate.setConnectTimeout(timeout);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   475
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   476
90ce3da70b43 Initial load
duke
parents:
diff changeset
   477
    public int getConnectTimeout() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   478
        return delegate.getConnectTimeout();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   479
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   480
90ce3da70b43 Initial load
duke
parents:
diff changeset
   481
    public void setReadTimeout(int timeout) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   482
        delegate.setReadTimeout(timeout);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   483
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   484
90ce3da70b43 Initial load
duke
parents:
diff changeset
   485
    public int getReadTimeout() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   486
        return delegate.getReadTimeout();
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 void setFixedLengthStreamingMode (int contentLength) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   490
        delegate.setFixedLengthStreamingMode(contentLength);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   491
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   492
1576
b697b141012d 6755625: Add HttpURLConnection.setFixedLengthStreamingMode(long)
chegar
parents: 2
diff changeset
   493
    public void setFixedLengthStreamingMode(long contentLength) {
b697b141012d 6755625: Add HttpURLConnection.setFixedLengthStreamingMode(long)
chegar
parents: 2
diff changeset
   494
        delegate.setFixedLengthStreamingMode(contentLength);
b697b141012d 6755625: Add HttpURLConnection.setFixedLengthStreamingMode(long)
chegar
parents: 2
diff changeset
   495
    }
b697b141012d 6755625: Add HttpURLConnection.setFixedLengthStreamingMode(long)
chegar
parents: 2
diff changeset
   496
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   497
    public void setChunkedStreamingMode (int chunklen) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   498
        delegate.setChunkedStreamingMode(chunklen);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   499
    }
42351
85ed90be0ae1 8169495: Add a method to set an Authenticator on a HttpURLConnection.
dfuchs
parents: 29615
diff changeset
   500
85ed90be0ae1 8169495: Add a method to set an Authenticator on a HttpURLConnection.
dfuchs
parents: 29615
diff changeset
   501
    @Override
85ed90be0ae1 8169495: Add a method to set an Authenticator on a HttpURLConnection.
dfuchs
parents: 29615
diff changeset
   502
    public void setAuthenticator(Authenticator auth) {
85ed90be0ae1 8169495: Add a method to set an Authenticator on a HttpURLConnection.
dfuchs
parents: 29615
diff changeset
   503
        delegate.setAuthenticator(auth);
85ed90be0ae1 8169495: Add a method to set an Authenticator on a HttpURLConnection.
dfuchs
parents: 29615
diff changeset
   504
    }
52474
13266dac5fdb 8212261: Add SSLSession accessors to HttpsURLConnection and SecureCacheResponse
xuelei
parents: 47411
diff changeset
   505
13266dac5fdb 8212261: Add SSLSession accessors to HttpsURLConnection and SecureCacheResponse
xuelei
parents: 47411
diff changeset
   506
    @Override
13266dac5fdb 8212261: Add SSLSession accessors to HttpsURLConnection and SecureCacheResponse
xuelei
parents: 47411
diff changeset
   507
    public Optional<SSLSession> getSSLSession() {
13266dac5fdb 8212261: Add SSLSession accessors to HttpsURLConnection and SecureCacheResponse
xuelei
parents: 47411
diff changeset
   508
        return Optional.ofNullable(delegate.getSSLSession());
13266dac5fdb 8212261: Add SSLSession accessors to HttpsURLConnection and SecureCacheResponse
xuelei
parents: 47411
diff changeset
   509
    }
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   510
}