From 75fe3383d87ba0a14c725537c9063f55d722cee3 Mon Sep 17 00:00:00 2001 From: Michael Koch Date: Fri, 1 Nov 2002 06:35:14 +0000 Subject: 2002-11-01 Michael Koch * 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 --- libjava/java/net/URL.java | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'libjava/java/net/URL.java') diff --git a/libjava/java/net/URL.java b/libjava/java/net/URL.java index b485c51231d..00dad2c7871 100644 --- a/libjava/java/net/URL.java +++ b/libjava/java/net/URL.java @@ -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 -- cgit v1.2.3