public KeyUri(String uri,byte[] address,int port){
  if (uri == null) {
    throw new NullPointerException("URI must not be null");
  }
 else   if (address == null) {
    throw new NullPointerException("address must not be null");
  }
 else   if (port < 0 || port > MAX_PORT_NO) {
    throw new IllegalArgumentException("port must be an unsigned 16 bit int");
  }
 else {
    this.uri=uri;
    this.address=address;
    this.port=port;
    this.hash=(port * 31 + uri.hashCode()) * 31 + Arrays.hashCode(address);
  }
}

public KeyUri ( String uri , byte [ ] address , int port ) { if ( uri == null ) { throw new NullPointerException ( "URI must not be null" ) ; } else if ( address == null ) { throw new NullPointerException ( "address must not be null" ) ; } else if ( port < 0 || port > MAX_PORT_NO ) { throw new IllegalArgumentException ( "port must be an unsigned 16 bit int" ) ; } else { this . uri = uri ; this . address = address ; this . port = port ; this . hash = ( port * 31 + uri . hashCode ( ) ) * 31 + Arrays . hashCode ( address ) ; } }
creates a new key for a uri scoped to an endpoint address .
