ADTarm-ehast-experimentalenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprpthread-emulationqualifiedEnum
Last change
on this file since 4864a73 was
67982887,
checked in by Peter A. Buhr <pabuhr@…>, 6 years ago
|
specialize thesis directory-names
|
-
Property mode set to
100644
|
File size:
593 bytes
|
Rev | Line | |
---|
[9c14ae9] | 1 | import java.io.IOException; |
---|
| 2 | |
---|
| 3 | public class res1 implements ires { |
---|
| 4 | public void write(String filename, String msg) throws IOException { |
---|
| 5 | FileOutputStream out = new FileOutputStream(filename); // may throw FileNotFoundException |
---|
| 6 | FileOutputStream log = new FileOutputStream("log.txt"); // or SecurityException |
---|
| 7 | out.write(msg.getBytes()); // may throw an IOException |
---|
| 8 | log.write(msg.getBytes()); // may throw an IOException |
---|
| 9 | log.close(); // may throw an IOException |
---|
| 10 | out.close(); // may throw an IOException |
---|
| 11 | } |
---|
| 12 | |
---|
| 13 | public static void main(String[] args) { |
---|
| 14 | res.dotest(new res1()); |
---|
| 15 | } |
---|
| 16 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.