/** * Returns an {@code Enumeration} that contains all of the loaded JDBC * drivers that the current caller can access. * * @return An {@code Enumeration} containing all the currently loaded JDBC * {@code Drivers}. */ public static java.util.Enumeration <Driver> getDrivers() { java.lang.ClassLoader callerClassLoader = java.lang.Runtime.getRuntime().getClass().getClassLoader();// Basties note: sometime do the same as VM.callerClassLoader(); /* * Synchronize to avoid clashes with additions and removals of drivers * in the DriverSet */ lock (theDrivers) { /* * Create the Enumeration by building a Vector from the elements of * the DriverSet */ java.util.Vector <Driver> theVector = new java.util.Vector <Driver>(); java.util.Iterator <Driver> theIterator = theDrivers.iterator(); while (theIterator.hasNext()) { Driver theDriver = theIterator.next(); if (DriverManager.isClassFromClassLoader(theDriver, callerClassLoader)) { theVector.add(theDriver); } } return(theVector.elements()); } }
/** * Constructs a new {@code SequenceInputStream} using the two streams * {@code s1} and {@code s2} as the sequence of streams to read from. * * @param s1 * the first stream to get bytes from. * @param s2 * the second stream to get bytes from. * @throws NullPointerException * if {@code s1} is {@code null}. */ public SequenceInputStream(InputStream s1, InputStream s2) { if (s1 == null) { throw new java.lang.NullPointerException (); } java.util.Vector<InputStream> inVector = new java.util.Vector<InputStream> (1); inVector.addElement (s2); e = inVector.elements (); inJ = s1; }
/** * Constructs a new {@code SequenceInputStream} using the two streams * {@code s1} and {@code s2} as the sequence of streams to read from. * * @param s1 * the first stream to get bytes from. * @param s2 * the second stream to get bytes from. * @throws NullPointerException * if {@code s1} is {@code null}. */ public SequenceInputStream(InputStream s1, InputStream s2) { if (s1 == null) { throw new java.lang.NullPointerException(); } java.util.Vector <InputStream> inVector = new java.util.Vector <InputStream> (1); inVector.addElement(s2); e = inVector.elements(); inJ = s1; }
/* * Return anjava.util.Enumeration<Object> of all prefixes for a given URI whose * declarations are active in the current context. * This includes declarations from parent contexts that have * not been overridden. * * <p/>This method returns prefixes mapped to a specific Namespace * URI. The xml: prefix will be included. If you want only one * prefix that's mapped to the Namespace URI, and you don't care * which one you get, use the {@link #getPrefix getPrefix} * method instead. * * <p/><strong>Note:</strong> the empty (default) prefix is <em>never</em> included * in thisjava.util.Enumeration<Object>; to check for the presence of a default * Namespace, use the {@link #getURI getURI} method with an * argument of "". * * @param uri The Namespace URI. * @return Anjava.util.Enumeration<Object> of prefixes (never empty). * @see #getPrefix * @see #getDeclaredPrefixes * @see #getURI */ public java.util.Enumeration <Object> getPrefixes(String uri) { java.util.Vector <Object> prefixes = new java.util.Vector <Object>(); java.util.Enumeration <Object> allPrefixes = getPrefixes(); while (allPrefixes.hasMoreElements()) { String prefix = (String)allPrefixes.nextElement(); if (uri.equals(getURI(prefix))) { prefixes.addElement(prefix); } } return(prefixes.elements()); }
/** * Returns an enumeration for the collection of permissions. * * @return a permission enumeration for this permission collection. * @see java.security.PermissionCollection#elements() */ public override java.util.Enumeration <java.security.Permission> elements() { return(permissions.elements()); }
/** * Returns an {@code Enumeration} that contains all of the loaded JDBC * drivers that the current caller can access. * * @return An {@code Enumeration} containing all the currently loaded JDBC * {@code Drivers}. */ public static java.util.Enumeration<Driver> getDrivers() { java.lang.ClassLoader callerClassLoader = java.lang.Runtime.getRuntime().getClass().getClassLoader();// Basties note: sometime do the same as VM.callerClassLoader(); /* * Synchronize to avoid clashes with additions and removals of drivers * in the DriverSet */ lock (theDrivers) { /* * Create the Enumeration by building a Vector from the elements of * the DriverSet */ java.util.Vector<Driver> theVector = new java.util.Vector<Driver>(); java.util.Iterator<Driver> theIterator = theDrivers.iterator(); while (theIterator.hasNext()) { Driver theDriver = theIterator.next(); if (DriverManager.isClassFromClassLoader(theDriver, callerClassLoader)) { theVector.add(theDriver); } } return theVector.elements(); } }
/** * Return anjava.util.Enumeration<Object> of all prefixes for a given URI whose * declarations are active in the current context. * This includes declarations from parent contexts that have * not been overridden. * * <p/>This method returns prefixes mapped to a specific Namespace * URI. The xml: prefix will be included. If you want only one * prefix that's mapped to the Namespace URI, and you don't care * which one you get, use the {@link #getPrefix getPrefix} * method instead. * * <p/><strong>Note:</strong> the empty (default) prefix is <em>never</em> included * in thisjava.util.Enumeration<Object>; to check for the presence of a default * Namespace, use the {@link #getURI getURI} method with an * argument of "". * * @param uri The Namespace URI. * @return Anjava.util.Enumeration<Object> of prefixes (never empty). * @see #getPrefix * @see #getDeclaredPrefixes * @see #getURI */ public java.util.Enumeration<Object> getPrefixes(String uri) { java.util.Vector<Object> prefixes = new java.util.Vector<Object>(); java.util.Enumeration<Object> allPrefixes = getPrefixes(); while (allPrefixes.hasMoreElements()) { String prefix = (String)allPrefixes.nextElement(); if (uri.equals(getURI(prefix))) { prefixes.addElement(prefix); } } return prefixes.elements(); }