Index: doc/theses/rob_schluntz/examples/intro/res2.java
===================================================================
--- doc/theses/rob_schluntz/examples/intro/res2.java	(revision 90152a4860529aff7214be01cd22abd37012cd19)
+++ doc/theses/rob_schluntz/examples/intro/res2.java	(revision 90152a4860529aff7214be01cd22abd37012cd19)
@@ -0,0 +1,22 @@
+import java.io.IOException;
+
+public class res2 implements ires {
+  public void write(String filename, String msg) throws Exception {
+    FileOutputStream out = new FileOutputStream(filename); // may throw FileNotFoundException
+    try {
+      FileOutputStream log = new FileOutputStream("log.txt"); //  or SecurityException
+      try {
+        out.write(msg.getBytes()); // may throw an IOException
+        log.write(msg.getBytes()); // may throw an IOException
+      } finally {
+        log.close(); // may throw an IOException
+      }
+    } finally {
+      out.close(); // may throw an IOException
+    }
+  }
+
+  public static void main(String[] args) {
+    res.dotest(new res2());
+  }
+}
