Lines Matching defs:spec

425      * @param      spec   the <code>String</code> to parse as a URL.
427 * unknown protocol is found, or <tt>spec</tt> is <tt>null</tt>.
430 public URL(String spec) throws MalformedURLException {
431 this(null, spec);
435 * Creates a URL by parsing the given spec within a specified context.
437 * The new URL is created from the given context URL and the spec
447 * parts present in the spec are used in the new URL.
449 * If the scheme component is defined in the given spec and does not match
451 * URL based on the spec alone. Otherwise the scheme component is inherited
454 * If the authority component is present in the spec then the spec is
455 * treated as absolute and the spec authority and path will replace the
457 * spec then the authority of the new URL will be inherited from the
460 * If the spec's path component begins with a slash character
462 * path is treated as absolute and the spec path replaces the context path.
472 * @param spec the <code>String</code> to parse as a URL.
474 * unknown protocol is found, or <tt>spec</tt> is <tt>null</tt>.
481 public URL(URL context, String spec) throws MalformedURLException {
482 this(context, spec, null);
486 * Creates a URL by parsing the given spec with the specified handler
491 * @param spec the <code>String</code> to parse as a URL.
494 * unknown protocol is found, or <tt>spec</tt> is <tt>null</tt>.
505 public URL(URL context, String spec, URLStreamHandler handler)
508 String original = spec;
524 limit = spec.length();
525 while ((limit > 0) && (spec.charAt(limit - 1) <= ' ')) {
528 while ((start < limit) && (spec.charAt(start) <= ' ')) {
532 if (spec.regionMatches(true, start, "url:", 0, 4)) {
535 if (start < spec.length() && spec.charAt(start) == '#') {
543 ((c = spec.charAt(i)) != '/') ; i++) {
546 String s = spec.substring(start, i).toLowerCase();
565 // If the context is a hierarchical URL scheme and the spec
567 // compatibility and treat it as if the spec didn't contain
597 i = spec.indexOf('#', start);
599 ref = spec.substring(i + 1, limit);
614 handler.parseURL(this, spec, start, limit);