Lines Matching refs:context

164      * relative to the given {@code context}. If the protocol of the parsed URL
165 * does not match with the protocol of the context URL, then the newly
167 * {@code spec}. Otherwise the protocol is defined by the context URL.
169 * @param context
170 * the URL which is used as the context.
177 public URL(URL context, String spec) throws MalformedURLException {
178 this(context, spec, (URLStreamHandler) null);
183 * relative to the given {@code context}. The {@code handler} will be used
186 * parsed URL does not match with the protocol of the context URL, then the
188 * by {@code spec}. Otherwise the protocol is defined by the context URL.
190 * @param context
191 * the URL which is used as the context.
200 public URL(URL context, String spec, URLStreamHandler handler)
254 // If the context was specified, and it had the same protocol
256 // in the context but still allow them to be over-ridden later
258 if (context != null && protocol.equals(context.getProtocol())) {
259 String cPath = context.getPath();
261 set(protocol, context.getHost(), context.getPort(), context
262 .getAuthority(), context.getUserInfo(), cPath,
263 context.getQuery(), null);
266 strmHandler = context.strmHandler;
270 // If the spec did not include a protocol, then the context
272 // values in the context, but still allow them to be over-ridden
274 if (context == null) {
279 set(context.getProtocol(), context.getHost(), context.getPort(),
280 context.getAuthority(), context.getUserInfo(), context
281 .getPath(), context.getQuery(), null);
283 strmHandler = context.strmHandler;