diff options
author | Michael Koch <mkoch@gcc.gnu.org> | 2002-09-25 05:05:07 +0000 |
---|---|---|
committer | Michael Koch <mkoch@gcc.gnu.org> | 2002-09-25 05:05:07 +0000 |
commit | ed08cfe4cd05b81e9dbdf33866c8e292a424fb67 (patch) | |
tree | 39ea9a29a7413c3343fed19100ab8885a7a52d60 /libjava/java/net/URLClassLoader.java | |
parent | 95ddd785f615b57b28764a3466b9cb167512a414 (diff) | |
download | gcc-ed08cfe4cd05b81e9dbdf33866c8e292a424fb67.zip gcc-ed08cfe4cd05b81e9dbdf33866c8e292a424fb67.tar.gz gcc-ed08cfe4cd05b81e9dbdf33866c8e292a424fb67.tar.bz2 |
2002-09-25 Michael Koch <konqueror@gmx.de>
* java/net/DatagramPacket
(DatagramPacket): Exception documentation added.
(setData): Likewise.
(setSocketAddress): Likewise.
* java/net/DatagramSocketImpl.java
(peek): Documentation addded.
(peekData): Documentation addded.
(send): Documentation addded.
(receive): Documentation addded.
(connect): New method.
(disconnect): New method.
(joinGroup): New abstract method.
(leaveGroup): New abstract method.
* java/net/InetSocketAddress.java
(InetSocketAddress): Documentation added.
(equals): final keyword added.
(getAddress): final keyword added.
(getHostName): final keyword added.
(getPort): final keyword added.
(hashCode): final keyword added.
(isUnresolved): final keyword added.
* java/net/MulticastSocket.java
(MulticastSocket): Documentation added.
(MulticastSocket): New method.
(joinGroup): Documentation added.
(joinGroup): New method.
(leaveGroup): Documentation added.
(leaveGroup): New method.
(send): Documentation added.
* java/net/NetworkInterface.java
(getByName): Documentation added.
(getByInetAddress): Documentation added.
(getNetworkInterfaces): Documentation added.
* java/net/PlainDatagramSocketImpl.java
(connect): New method.
(disconnect): New method.
* java/net/SocketImpl.java
(create): Documentation added.
(shutdownInput): Convert public to protected, as it always was.
(shutdownOutput): Convert public to protected, as it always was.
* java/net/SocketOptions.java
(whole file): Reintented.
* java/net/URLClassLoader.java
(URLClassLoader): SecurityManager check added, documentation added.
(findResources): Documentation added.
(findClass): Documentation added.
(newInstance): More correct method arguments.
* java/net/URLConnection.java
(connect): Documentation added.
(getContent): Documentation added.
(getPermission): Documentation added.
(getInputStream): Documentation added.
(getOutputStream): Documentation added.
(setDoInput): Throw correct exception, documentation added.
(setDoOutput): Throw correct exception, documentation added.
(setAllowUserInteraction): Throw correct exception, documentation added.
(setUseCaches): Throw correct exception, documentation added.
(setIfModifiedSince): Throw correct exception, documentation added.
(setRequestProperty): Throw exception, documentation added.
(addRequestProperty): Throw exception, documentation added.
(getRequestProperty): Throw exception, documentation added.
(getRequestProperties): Documentation added.
(setContentHandlerFactory): Documentation added.
(guessContentTypeFromName): protected to public.
(setFileNameMap): Documentation added.
* java/net/URLDecoder.java
(URLDecoder): New method.
(decode): Documentation added.
(whole file): Reindented.
* java/net/URLEncoder.java
(encode): Documentation added.
* java/net/natPlainDatagramSocketImpl.cc
(connect): New method.
(disconnect): New method.
* javax/naming/RefAddr:
(addrType): addrType was never final.
(equals): Fix typo in method name.
* javax/naming/BinaryRefAddr:
(equals): Fix typo in method name.
From-SVN: r57487
Diffstat (limited to 'libjava/java/net/URLClassLoader.java')
-rw-r--r-- | libjava/java/net/URLClassLoader.java | 43 |
1 files changed, 38 insertions, 5 deletions
diff --git a/libjava/java/net/URLClassLoader.java b/libjava/java/net/URLClassLoader.java index 7e59c66..5e059cf 100644 --- a/libjava/java/net/URLClassLoader.java +++ b/libjava/java/net/URLClassLoader.java @@ -40,11 +40,23 @@ public class URLClassLoader extends SecureClassLoader return null; } + /** + * Createa a new URL class loader object + * + * @exception SecurityException If a security manager exists and its + * checkCreateClassLoader method doesn't allow creation of a class loader + */ public URLClassLoader (URL[] urls) { this (urls, null, null); } - + + /** + * Createa a new URL class loader object + * + * @exception SecurityException If a security manager exists and its + * checkCreateClassLoader method doesn't allow creation of a class loader + */ public URLClassLoader (URL[] urls, ClassLoader parent) { this (urls, parent, null); @@ -100,11 +112,21 @@ public class URLClassLoader extends SecureClassLoader info.addElement (conn); } + /** + * Createa a new URL class loader object + * + * @exception SecurityException If a security manager exists and its + * checkCreateClassLoader method doesn't allow creation of a class loader + */ public URLClassLoader (URL[] urls, ClassLoader parent, URLStreamHandlerFactory fac) { super (parent); + SecurityManager s = System.getSecurityManager(); + if (s != null) + s.checkCreateClassLoader(); + factory = fac; if (urls == null || urls.length == 0) @@ -150,7 +172,13 @@ public class URLClassLoader extends SecureClassLoader path.copyInto (urls); return urls; } - + + /** + * Returns an Enumeration of URLs representing all of the resources on the + * URL search path having the specified name + * + * @exception IOException If an error occurs + */ public Enumeration findResources (String name) { Vector results = new Vector (); @@ -224,7 +252,12 @@ public class URLClassLoader extends SecureClassLoader return null; } - // and finally, we can implement our class loader functionality. + /** + * Finds and loads the class with the specified name from the + * URL search path + * + * @exception ClassNotFoundException If the class could not be found + */ protected Class findClass (String name) throws ClassNotFoundException { @@ -404,7 +437,7 @@ public class URLClassLoader extends SecureClassLoader * system class loader. * @param urls the initial URLs used to resolve classes and resources */ - public static URLClassLoader newInstance(URL urls[]) throws + public static URLClassLoader newInstance(URL[] urls) throws SecurityException { return new URLClassLoader(urls); @@ -416,7 +449,7 @@ public class URLClassLoader extends SecureClassLoader * @param urls the initial URLs used to resolve classes and resources * @param parent the parent class loader */ - public static URLClassLoader newInstance(URL urls[], + public static URLClassLoader newInstance(URL[] urls, ClassLoader parent) throws SecurityException { |