/* * Copyright 2002 Tryllian BV and Otto Moerbeek * http://www.tryllian.com * otto@tryllian.com */ package test; import java.io.*; /** * This class implements code for testing the delegation mechanism. * * @author Otto Moerbeek */ public class Test implements net.drijf.javaone.TestInterface { /** Try to read a file */ public String tryToReadFile(String file) throws IOException { BufferedReader rdr = new BufferedReader(new InputStreamReader( new FileInputStream(file))); return rdr.readLine(); } /** Try to create a thread */ public void tryToCreateThread() { new Thread(); } /** Try to exit the VM */ public void tryToExitVM() { System.exit(0); } }