if (host != null) this.authority += host; if (port >= 0) this.authority += ":" + port;
    protected void set(String protocol, String host, int port, String file,            String ref) {        // TBD: Theoretically, a poorly written StreamHandler could pass an        // invalid protocol. It will cause the handler to be set to null        // thus overriding a valid handler. Callers of this method should        // be aware of this.        this.handler = getURLStreamHandler(protocol);        this.protocol = protocol.toLowerCase();        this.authority = null;        this.port = port;        this.host = host;        this.file = file;        this.ref = ref;        hashCode = hashCode(); // Used for serialization.    }