Main Page   Packages   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

BanderaLog.java

00001 package edu.ksu.cis.bandera.util;
00002 
00003 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
00004  * Bandera, a Java(TM) analysis and transformation toolkit           *
00005  * Copyright (C) 2000  Roby Joehanes (robbyjo@cis.ksu.edu)           *
00006  * All rights reserved.                                              *
00007  *                                                                   *
00008  * This work was done as a project in the SAnToS Laboratory,         *
00009  * Department of Computing and Information Sciences, Kansas State    *
00010  * University, USA (http://www.cis.ksu.edu/santos).                  *
00011  * It is understood that any modification not identified as such is  *
00012  * not covered by the preceding statement.                           *
00013  *                                                                   *
00014  * This work is free software; you can redistribute it and/or        *
00015  * modify it under the terms of the GNU Library General Public       *
00016  * License as published by the Free Software Foundation; either      *
00017  * version 2 of the License, or (at your option) any later version.  *
00018  *                                                                   *
00019  * This work is distributed in the hope that it will be useful,      *
00020  * but WITHOUT ANY WARRANTY; without even the implied warranty of    *
00021  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU *
00022  * Library General Public License for more details.                  *
00023  *                                                                   *
00024  * You should have received a copy of the GNU Library General Public *
00025  * License along with this toolkit; if not, write to the             *
00026  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,      *
00027  * Boston, MA  02111-1307, USA.                                      *
00028  *                                                                   *
00029  * Java is a trademark of Sun Microsystems, Inc.                     *
00030  *                                                                   *
00031  * To submit a bug report, send a comment, or get the latest news on *
00032  * this project and other SAnToS projects, please visit the web-site *
00033  *                http://www.cis.ksu.edu/santos                      *
00034  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
00035 import java.util.*;
00036 import java.io.*;
00037 
00038 public class BanderaLog extends PrintStream {
00039     private PrintStream stdout = null;
00040     private PrintStream fileio = null;
00041     private boolean internal = false;
00042     protected boolean fails = false;
00043 /**
00044  * BanderaLog constructor comment.
00045  * @param out java.io.OutputStream
00046  */
00047 public BanderaLog(java.io.OutputStream out) {
00048     super(out);
00049 }
00050 /**
00051  * BanderaLog constructor comment.
00052  * @param out java.io.OutputStream
00053  * @param autoFlush boolean
00054  */
00055 public BanderaLog(java.io.OutputStream out, boolean autoFlush) {
00056     super(out, autoFlush);
00057 }
00058     public BanderaLog(PrintStream out, PrintStream f)
00059     {
00060         super(f); stdout = out; fileio = f;
00061     }
00062 public boolean isError() { return fails; }
00063 public void print(char[] s)  { if (!internal) stdout.print(s); fileio.print(s); }
00064 public void print(char c)    { if (!internal) stdout.print(c); fileio.print(c); }
00065 public void print(double d)  { if (!internal) stdout.print(d); fileio.print(d); }
00066 public void print(float f)   { if (!internal) stdout.print(f); fileio.print(f); }
00067 public void print(int i)     { if (!internal) stdout.print(i); fileio.print(i); }
00068 public void print(long l)    { if (!internal) stdout.print(l); fileio.print(l); }
00069 public void print(Object obj)  { if (!internal) stdout.print(obj); fileio.print(obj); }
00070 public void print(String s)    { if (!internal) stdout.print(s); fileio.print(s); }
00071 public void print(boolean b) { if (!internal) stdout.print(b); fileio.print(b); }
00072 public void println()          { if (!internal) stdout.println(); fileio.println(); }
00073 public void println(char[] x)  { if (!internal) stdout.println(x); fileio.println(x); }
00074 public void println(char x)    { if (!internal) stdout.println(x); fileio.println(x); }
00075 public void println(double x)  { if (!internal) stdout.println(x); fileio.println(x); }
00076 public void println(float x)   { if (!internal) stdout.println(x); fileio.println(x); }
00077 public void println(int x)     { if (!internal) stdout.println(x); fileio.println(x); }
00078 public void println(long x)    { if (!internal) stdout.println(x); fileio.println(x); }
00079 public void println(Object x)  { if (!internal) stdout.println(x); fileio.println(x); }
00080 public void println(String x)  { if (!internal) stdout.println(x); fileio.println(x); }
00081 public void println(boolean x) { if (!internal) stdout.println(x); fileio.println(x); }
00082 protected void setError() { fails = true; }
00083 public void setInternal(boolean b) { internal = b; }
00084 public void write(byte[] buf, int off, int len)  { if (!internal) stdout.write(buf,off,len); fileio.write(buf,off,len); }
00085 public void write(int b) { if (!internal) stdout.write(b); fileio.write(b); }
00086 }

Generated at Thu Feb 7 06:40:31 2002 for Bandera by doxygen1.2.10 written by Dimitri van Heesch, © 1997-2001