114 * according to the escaping mechanism defined in RFC2396. It is the
115 * responsibility of the caller to encode any fields, which need to be
116 * escaped prior to calling URL, and also to decode any escaped fields,
117 * that are returned from URL. Furthermore, because URL has no knowledge
118 * of URL escaping, it does not recognise equivalence between the encoded
119 * or decoded form of the same URL. For example, the two URLs:<br>
120 * <pre> http://foo.com/hello world/ and http://foo.com/hello%20world</pre>
121 * would be considered not equal to each other.
122 * <p>
123 * Note, the {@link java.net.URI} class does perform escaping of its
124 * component fields in certain circumstances. The recommended way
125 * to manage the encoding and decoding of URLs is to use {@link java.net.URI},
126 * and to convert between these two classes using {@link #toURI()} and
127 * {@link URI#toURL()}.
128 * <p>
129 * The {@link URLEncoder} and {@link URLDecoder} classes can also be
130 * used, but only for HTML form encoding, which is not the same
131 * as the encoding scheme defined in RFC2396.
132 *
133 * @author James Gosling
134 * @since JDK1.0
135 */
136 public final class URL implements java.io.Serializable {
137
138 static final long serialVersionUID = -7627629688361524110L;
139
140 /**
141 * The property which specifies the package prefix list to be scanned
142 * for protocol handlers. The value of this property (if any) should
143 * be a vertical bar delimited list of package names to search through
144 * for a protocol handler to load. The policy of this class is that
145 * all protocol handlers will be in a class called <protocolname>.Handler,
146 * and each package in the list is examined in turn for a matching
147 * handler. If none are found (or the property is not specified), the
148 * default package prefix, sun.net.www.protocol, is used. The search
149 * proceeds from the first package in the list to the last and stops
150 * when a match is found.
151 */
152 private static final String protocolPathProp = "java.protocol.handler.pkgs";
153
154 /**
|
114 * according to the escaping mechanism defined in RFC2396. It is the
115 * responsibility of the caller to encode any fields, which need to be
116 * escaped prior to calling URL, and also to decode any escaped fields,
117 * that are returned from URL. Furthermore, because URL has no knowledge
118 * of URL escaping, it does not recognise equivalence between the encoded
119 * or decoded form of the same URL. For example, the two URLs:<br>
120 * <pre> http://foo.com/hello world/ and http://foo.com/hello%20world</pre>
121 * would be considered not equal to each other.
122 * <p>
123 * Note, the {@link java.net.URI} class does perform escaping of its
124 * component fields in certain circumstances. The recommended way
125 * to manage the encoding and decoding of URLs is to use {@link java.net.URI},
126 * and to convert between these two classes using {@link #toURI()} and
127 * {@link URI#toURL()}.
128 * <p>
129 * The {@link URLEncoder} and {@link URLDecoder} classes can also be
130 * used, but only for HTML form encoding, which is not the same
131 * as the encoding scheme defined in RFC2396.
132 *
133 * @author James Gosling
134 * @since 1.0
135 */
136 public final class URL implements java.io.Serializable {
137
138 static final long serialVersionUID = -7627629688361524110L;
139
140 /**
141 * The property which specifies the package prefix list to be scanned
142 * for protocol handlers. The value of this property (if any) should
143 * be a vertical bar delimited list of package names to search through
144 * for a protocol handler to load. The policy of this class is that
145 * all protocol handlers will be in a class called <protocolname>.Handler,
146 * and each package in the list is examined in turn for a matching
147 * handler. If none are found (or the property is not specified), the
148 * default package prefix, sun.net.www.protocol, is used. The search
149 * proceeds from the first package in the list to the last and stops
150 * when a match is found.
151 */
152 private static final String protocolPathProp = "java.protocol.handler.pkgs";
153
154 /**
|