1 /*
2 Jameleon - An automation testing tool..
3 Copyright (C) 2007 Christian W. Hargraves (engrean@hotmail.com)
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with this library; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19 package net.sf.jameleon.reporting;
20
21 import java.io.IOException;
22 import java.io.Writer;
23
24 public abstract class AbstractTestRunReporter implements TestRunReporter {
25 private Writer writer;
26
27 public void cleanUp() {
28 try{
29 if (writer != null){
30 writer.flush();
31 writer.close();
32 writer = null;
33 }
34 }catch(IOException ioe){
35 ioe.printStackTrace();
36 }
37 }
38
39 public Writer getWriter() {
40 return writer;
41 }
42
43 public void setWriter(Writer writer) {
44 this.writer = writer;
45 }
46 }