src/share/classes/com/sun/naming/internal/VersionHelper.java
Print this page
*** 27,37 ****
import java.io.InputStream;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
- import java.util.Enumeration;
import java.util.StringTokenizer;
import java.util.Vector;
import javax.naming.NamingEnumeration;
--- 27,36 ----
*** 76,92 ****
public static VersionHelper getVersionHelper() {
return helper;
}
! public abstract Class loadClass(String className)
throws ClassNotFoundException;
! abstract Class loadClass(String className, ClassLoader cl)
throws ClassNotFoundException;
! public abstract Class loadClass(String className, String codebase)
throws ClassNotFoundException, MalformedURLException;
/*
* Returns a JNDI property from the system properties. Returns
* null if the property is not set, or if there is no permission
--- 75,91 ----
public static VersionHelper getVersionHelper() {
return helper;
}
! public abstract Class<?> loadClass(String className)
throws ClassNotFoundException;
! abstract Class<?> loadClass(String className, ClassLoader cl)
throws ClassNotFoundException;
! public abstract Class<?> loadClass(String className, String codebase)
throws ClassNotFoundException, MalformedURLException;
/*
* Returns a JNDI property from the system properties. Returns
* null if the property is not set, or if there is no permission
*** 104,114 ****
/*
* Returns the resource of a given name associated with a particular
* class (never null), or null if none can be found.
*/
! abstract InputStream getResourceAsStream(Class c, String name);
/*
* Returns an input stream for a file in <java.home>/lib,
* or null if it cannot be located or opened.
*
--- 103,113 ----
/*
* Returns the resource of a given name associated with a particular
* class (never null), or null if none can be found.
*/
! abstract InputStream getResourceAsStream(Class<?> c, String name);
/*
* Returns an input stream for a file in <java.home>/lib,
* or null if it cannot be located or opened.
*
*** 120,130 ****
* Returns an enumeration (never null) of InputStreams of the
* resources of a given name associated with a particular class
* loader. Null represents the bootstrap class loader in some
* Java implementations.
*/
! abstract NamingEnumeration getResources(ClassLoader cl, String name)
throws IOException;
/*
* Returns the context class loader associated with the current thread.
* Null indicates the bootstrap class loader in some Java implementations.
--- 119,130 ----
* Returns an enumeration (never null) of InputStreams of the
* resources of a given name associated with a particular class
* loader. Null represents the bootstrap class loader in some
* Java implementations.
*/
! abstract NamingEnumeration<InputStream> getResources(
! ClassLoader cl, String name)
throws IOException;
/*
* Returns the context class loader associated with the current thread.
* Null indicates the bootstrap class loader in some Java implementations.
*** 135,151 ****
static protected URL[] getUrlArray(String codebase)
throws MalformedURLException {
// Parse codebase into separate URLs
StringTokenizer parser = new StringTokenizer(codebase);
! Vector vec = new Vector(10);
while (parser.hasMoreTokens()) {
vec.addElement(parser.nextToken());
}
String[] url = new String[vec.size()];
for (int i = 0; i < url.length; i++) {
! url[i] = (String)vec.elementAt(i);
}
URL[] urlArray = new URL[url.length];
for (int i = 0; i < urlArray.length; i++) {
urlArray[i] = new URL(url[i]);
--- 135,151 ----
static protected URL[] getUrlArray(String codebase)
throws MalformedURLException {
// Parse codebase into separate URLs
StringTokenizer parser = new StringTokenizer(codebase);
! Vector<String> vec = new Vector<>(10);
while (parser.hasMoreTokens()) {
vec.addElement(parser.nextToken());
}
String[] url = new String[vec.size()];
for (int i = 0; i < url.length; i++) {
! url[i] = vec.elementAt(i);
}
URL[] urlArray = new URL[url.length];
for (int i = 0; i < urlArray.length; i++) {
urlArray[i] = new URL(url[i]);