01: /**********************************************************************************
02:
03: Feedzeo!
04: A free and open source RSS/Atom/RDF feed aggregator
05:
06: Copyright (C) 2005-2006 Anand Rao (anandrao@users.sourceforge.net)
07:
08: This library is free software; you can redistribute it and/or
09: modify it under the terms of the GNU Lesser General Public
10: License as published by the Free Software Foundation; either
11: version 2.1 of the License, or (at your option) any later version.
12:
13: This library is distributed in the hope that it will be useful,
14: but WITHOUT ANY WARRANTY; without even the implied warranty of
15: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16: Lesser General Public License for more details.
17:
18: You should have received a copy of the GNU Lesser General Public
19: License along with this library; if not, write to the Free Software
20: Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21:
22: ************************************************************************************/package css;
23:
24: import java.io.*;
25: import java.util.*;
26: import util.*;
27:
28: /**
29: *
30: * @author Anand Rao
31: */
32: public class CSSWriter extends CSSDoc {
33:
34: private PrintWriter File;
35:
36: /** Creates a new instance of CSSWriter */
37: public CSSWriter(String PathFileName) {
38: super ();
39: try {
40: File = new PrintWriter(new BufferedWriter(new FileWriter(
41: PathFileName, false)));
42: } catch (Exception e) {
43: ExceptionUtil.reportException(e);
44: }
45:
46: }
47:
48: public void writePage() {
49: String Page = toString();
50: try {
51: File.println(Page);
52: } catch (Exception e) {
53: ExceptionUtil.reportException(e);
54: }
55: }
56:
57: public void closePage() {
58: try {
59: File.close();
60: } catch (Exception e) {
61: ExceptionUtil.reportException(e);
62: }
63: }
64: }
|