2002-11-01 Michael Koch <konqueror@gmx.de>
* java/net/InetAddress.java: (isAnyLocalAddress): Implemented. (isLoopbackAddress): Implemented, comment added. (isLinkLocalAddress): Implemented, documentation added. (isSiteLocalAddress): Implemented, documentation added. (isMCGlobal): Implemented, documentation added. (isMCNodeLocal): Implemented, documentation added. (isMCLinkLocal): Implemented, documentation added. (isMCSiteLocal): Implemented, documentation added. (isMCOrgLocal): Implemented, documentation added. (getHostName): Documentation added. (getCanonicalHostName): Implemented, documentation added. (getAddress): Documentation added. (hashCode): Documentation added. (equals): Documentation added. (toString): Fixed implementation. (getByAddress): Use Inet4Address and Inet6Address. (lookup): New linewrap. (getByName): SecurityManager check added, support Inet4Address and Inet6address, comments added. (getAllByName): SecurityManager check added, comments added. * java/net/Inet6Address.java: (Inet6Address): Initialize parent class with addr instead of null. * java/net/URL.java (equals): Documentation added. (getFile): Documentation added. (hashCode): Documentation added. * java/net/natInetAddress.cc: (aton): Fix IPv6 support. * java/net/natPlainDatagramSocketImpl.cc: (peek): Throw PortUnreachableException when suitable. (peekData): Throw PortUnreachableException when suitable. (send): Throw PortUnreachableException when suitable. (receive): Throw PortUnreachableException when suitable. From-SVN: r58704
This commit is contained in:
parent
04c7481ed2
commit
75fe3383d8
6 changed files with 215 additions and 30 deletions
|
@ -254,6 +254,9 @@ public final class URL implements Serializable
|
|||
hashCode = hashCode(); // Used for serialization.
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if two URLs are equal
|
||||
*/
|
||||
public boolean equals(Object obj)
|
||||
{
|
||||
if (obj == null || ! (obj instanceof URL))
|
||||
|
@ -287,6 +290,9 @@ public final class URL implements Serializable
|
|||
return getContent();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the file of the URL
|
||||
*/
|
||||
public String getFile()
|
||||
{
|
||||
return file;
|
||||
|
@ -367,6 +373,9 @@ public final class URL implements Serializable
|
|||
return query;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a hashcode computed by the URLStreamHandler of this URL
|
||||
*/
|
||||
public int hashCode()
|
||||
{
|
||||
// JCL book says this is computed using (only) the hashcodes of the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue