- if (val instanceof JS) {
- Directory d2 = new Directory(f2);
- Enumeration e = ((JS)val).keys();
- while(e.hasMoreElements()) {
- String k = (String)e.nextElement();
- Object v = ((JS)val).get(k);
- d2.put(k, v);
- }
- } else {
+ if (val instanceof org.ibex.io.Fountain) {
+ Stream stream = ((org.ibex.io.Fountain)val).getStream();
+ Stream out = new Stream(null, new FileOutputStream(f2));
+ stream.transcribe(out);
+ out.close();
+ } else if (val instanceof JSPrimitive) {