37 import java.util.Objects;
38 import java.util.ServiceConfigurationError;
39 import java.util.ServiceLoader;
40 import java.util.StringTokenizer;
41 import java.util.Collections;
42 import java.util.Map;
43 import java.util.List;
44 import java.security.Permission;
45 import java.security.AccessController;
46 import sun.security.util.SecurityConstants;
47 import sun.net.www.MessageHeader;
48 import sun.security.action.GetPropertyAction;
49
50 /**
51 * The abstract class {@code URLConnection} is the superclass
52 * of all classes that represent a communications link between the
53 * application and a URL. Instances of this class can be used both to
54 * read from and to write to the resource referenced by the URL. In
55 * general, creating a connection to a URL is a multistep process:
56 *
57 * <div style="text-align:center"><table style="margin:0 auto" border=2 summary="Describes the process of creating a connection to a URL: openConnection() and connect() over time.">
58 * <tr><th>{@code openConnection()}</th>
59 * <th>{@code connect()}</th></tr>
60 * <tr><td>Manipulate parameters that affect the connection to the remote
61 * resource.</td>
62 * <td>Interact with the resource; query header fields and
63 * contents.</td></tr>
64 * </table>
65 * ---------------------------->
66 * <br>time</div>
67 *
68 * <ol>
69 * <li>The connection object is created by invoking the
70 * {@code openConnection} method on a URL.
71 * <li>The setup parameters and general request properties are manipulated.
72 * <li>The actual connection to the remote object is made, using the
73 * {@code connect} method.
74 * <li>The remote object becomes available. The header fields and the contents
75 * of the remote object can be accessed.
76 * </ol>
77 * <p>
78 * The setup parameters are modified using the following methods:
79 * <ul>
80 * <li>{@code setAllowUserInteraction}
81 * <li>{@code setDoInput}
82 * <li>{@code setDoOutput}
83 * <li>{@code setIfModifiedSince}
|
37 import java.util.Objects;
38 import java.util.ServiceConfigurationError;
39 import java.util.ServiceLoader;
40 import java.util.StringTokenizer;
41 import java.util.Collections;
42 import java.util.Map;
43 import java.util.List;
44 import java.security.Permission;
45 import java.security.AccessController;
46 import sun.security.util.SecurityConstants;
47 import sun.net.www.MessageHeader;
48 import sun.security.action.GetPropertyAction;
49
50 /**
51 * The abstract class {@code URLConnection} is the superclass
52 * of all classes that represent a communications link between the
53 * application and a URL. Instances of this class can be used both to
54 * read from and to write to the resource referenced by the URL. In
55 * general, creating a connection to a URL is a multistep process:
56 *
57 * <div style="text-align:center"><table class="plain" style="margin:0 auto">
58 * <caption style="display:none">Describes the process of creating a connection to a URL: openConnection() and connect() over time.</caption>
59 * <thead>
60 * <tr><th>{@code openConnection()}</th>
61 * <th>{@code connect()}</th></tr>
62 * </thead>
63 * <tbody>
64 * <tr><td>Manipulate parameters that affect the connection to the remote
65 * resource.</td>
66 * <td>Interact with the resource; query header fields and
67 * contents.</td></tr>
68 * </tbody>
69 * </table>
70 * ---------------------------->
71 * <br>time</div>
72 *
73 * <ol>
74 * <li>The connection object is created by invoking the
75 * {@code openConnection} method on a URL.
76 * <li>The setup parameters and general request properties are manipulated.
77 * <li>The actual connection to the remote object is made, using the
78 * {@code connect} method.
79 * <li>The remote object becomes available. The header fields and the contents
80 * of the remote object can be accessed.
81 * </ol>
82 * <p>
83 * The setup parameters are modified using the following methods:
84 * <ul>
85 * <li>{@code setAllowUserInteraction}
86 * <li>{@code setDoInput}
87 * <li>{@code setDoOutput}
88 * <li>{@code setIfModifiedSince}
|