+ public InputStream getInputStream() throws IOException { return clonee.getInputStream(); }
+ }
+
+ public static abstract class Enumeration extends JS {
+ final Enumeration parent;
+ boolean done;
+ public Enumeration(Enumeration parent) { this.parent = parent; }
+ protected abstract boolean _hasMoreElements();
+ protected abstract JS _nextElement() throws JSExn;
+
+ public final boolean hasMoreElements() {
+ if(!done && !_hasMoreElements()) done = true;
+ return !done ? true : parent != null ? parent.hasMoreElements() : false;
+ }
+ public final JS nextElement() throws JSExn { return !done ? _nextElement() : parent != null ? parent.nextElement() : null; }
+
+ public JS get(JS key) throws JSExn {
+ //#jswitch(key)
+ case "hasMoreElements": return B(hasMoreElements());
+ case "nextElement": return nextElement();
+ //#end
+ return super.get(key);
+ }
+ }
+ public static class EmptyEnumeration extends Enumeration {
+ public EmptyEnumeration(Enumeration parent) { super(parent); }
+ protected boolean _hasMoreElements() { return false; }
+ protected JS _nextElement() { return null; }
+ }
+ public static class JavaEnumeration extends Enumeration {
+ private final java.util.Enumeration e;
+ public JavaEnumeration(Enumeration parent, java.util.Enumeration e) { super(parent); this.e = e; }
+ protected boolean _hasMoreElements() { return e.hasMoreElements(); }
+ protected JS _nextElement() { return (JS) e.nextElement(); }