From fc44b85de78353cb3930e3d59346863bf344ef93 Mon Sep 17 00:00:00 2001 From: Michael Koch Date: Wed, 25 Sep 2002 17:14:09 +0000 Subject: 2002-09-25 Michael Koch * java/net/DatagramSocket.java (DatagramSocket): Initialize new instance variables. (close): Reset new instance variables. (getLocalAddress): Remove unneeded SecurityManager usage. (getLocalPort): Check if socket is already bound. (isConnected): New method. (getInetAddress): Implemented. (getPort): Better Implementation, documentation fixed. (getRemoteSocketAddress): New method. * java/net/JarURLConnection.java (element): Typo fixed. (getMainAttributes): New method. (getAttributes): New method (stub only). (getManifest): New method (stub only). * java/net/NetPermission.java: Added serialVersionsUID. * java/net/Socket.java (connect): Check blocking mode of associated channel, documentation added. (getLocalSocketAddress): Better implementation. (getRemoteSocketAddress): Implemented. (isBound): New method. (setSendBufferSize): Documentation added. * java/net/SocketAddress.java: Added serialVersionsUID. * java/net/SocketPermission.java: Added serialVersionsUID. * java/net/URL.java (URL): Wrap for shorter lines, initialize new instance variables, documentation added. (equals): Check new instance variables too. (getContent): Documentation added. (getPath): Documentation added. (getAuthority): New method. (getHost): Documentation added. (getPort): Documentation added. (getDefaultPort): New method. (getProtocol): Documentation added. (getUserInfo): Documentation added. (set): Initialize new instance variables, documentation added. * java/net/URLStreamHandler.java (setURL): New method. * java/net/natPlainDatagramSocketImpl.cc (connect): Fix exception name. (disconnect): Fix exception name. From-SVN: r57501 --- libjava/java/net/JarURLConnection.java | 37 +++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) (limited to 'libjava/java/net/JarURLConnection.java') diff --git a/libjava/java/net/JarURLConnection.java b/libjava/java/net/JarURLConnection.java index 8f75622975f..a90c7f33037 100644 --- a/libjava/java/net/JarURLConnection.java +++ b/libjava/java/net/JarURLConnection.java @@ -34,7 +34,7 @@ public abstract class JarURLConnection extends URLConnection * either case this describes just the jar file itself. */ protected URLConnection jarFileURLConnection; - // If this is a connection to a jar file element this is set, otherwose null. + // If this is a connection to a jar file element this is set, otherwise null. private final String element; // Cached JarURLConnection's @@ -349,4 +349,39 @@ public abstract class JarURLConnection extends URLConnection { return getJarEntry().getCertificates(); } + + /** + * Returns the main Attributes for the JAR file for this connection + * + * @exception IOException If an error occurs + */ + public Attributes getMainAttributes () throws IOException + { + return getManifest ().getMainAttributes (); + } + + /** + * Return the Attributes object for this connection if the URL for it points + * to a JAR file entry, null otherwise + * + * @exception IOException If an error occurs + */ + public Attributes getAttributes () throws IOException + { + // FIXME: implement this + return null; + } + + /** + * Returns the Manifest for this connection, or null if none + * + * @exception IOException If an error occurs + */ + public Manifest getManifest () throws IOException + { + JarFile file = getJarFile (); + + // FIXME: implement this + return null; + } } -- cgit v1.2.3