FileDocCategorySizeDatePackage
VersionHelper.javaAPI DocJava SE 5 API4484Fri Aug 26 14:55:16 BST 2005com.sun.naming.internal

VersionHelper

public abstract class VersionHelper extends Object
VersionHelper was used by JNDI to accommodate differences between JDK 1.1.x and the Java 2 platform. Since this is no longer necessary due to JNDI's presence in the Java 2 Platform v1.3 and higher, this class currently serves as a set of utilities for performing system-level things, such as class-loading and reading system properties.
author
Rosanna Lee
author
Scott Seligman
version
1.9 03/12/19

Fields Summary
private static VersionHelper
helper
static final String[]
PROPS
public static final int
INITIAL_CONTEXT_FACTORY
public static final int
OBJECT_FACTORIES
public static final int
URL_PKG_PREFIXES
public static final int
STATE_FACTORIES
public static final int
PROVIDER_URL
public static final int
DNS_URL
public static final int
CONTROL_FACTORIES
Constructors Summary
VersionHelper()


     
Methods Summary
abstract java.lang.ClassLoadergetContextClassLoader()

abstract java.io.InputStreamgetJavaHomeLibStream(java.lang.String filename)

abstract java.lang.String[]getJndiProperties()

abstract java.lang.StringgetJndiProperty(int i)

abstract java.io.InputStreamgetResourceAsStream(java.lang.Class c, java.lang.String name)

abstract javax.naming.NamingEnumerationgetResources(java.lang.ClassLoader cl, java.lang.String name)

protected static java.net.URL[]getUrlArray(java.lang.String codebase)

	// 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]);
	}
	return urlArray;
    
public static com.sun.naming.internal.VersionHelpergetVersionHelper()

	helper = new VersionHelper12();
    
	return helper;
    
public abstract java.lang.ClassloadClass(java.lang.String className)

abstract java.lang.ClassloadClass(java.lang.String className, java.lang.ClassLoader cl)

public abstract java.lang.ClassloadClass(java.lang.String className, java.lang.String codebase)