PrintStream.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2004 X-Way Rights BV
00003  *
00004  * This library is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU Lesser General Public
00006  * License as published by the Free Software Foundation; either
00007  * version 2.1 of the License, or (at your option) any later version.
00008  *
00009  * This library is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012  * Lesser General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU Lesser General Public
00015  * License along with this library; if not, write to the Free Software
00016  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00017  */
00018 
00023 #ifndef _CLASS_BEE_IO_PRINTSTREAM_H
00024 #define _CLASS_BEE_IO_PRINTSTREAM_H
00025 
00026 #ifdef __cplusplus
00027 
00028 #include "beecrypt/c++/io/FilterOutputStream.h"
00029 using beecrypt::io::FilterOutputStream;
00030 
00031 #include <unicode/ucnv.h>
00032 
00033 namespace beecrypt {
00034     namespace io {
00037         class BEECRYPTCXXAPI PrintStream : public FilterOutputStream
00038         {
00039         private:
00040             bool _closed;
00041             bool _error;
00042             bool _flush;
00043             UConverter* _loc;
00044 
00045             void print(const UChar*, size_t) throw ();
00046 
00047         protected:
00048             void setError() throw ();
00049 
00050         public:
00051             PrintStream(OutputStream& out, bool autoflush = false, const char* encoding = 0);
00052             virtual ~PrintStream();
00053 
00054             virtual void close() throw ();
00055             virtual void flush() throw ();
00056             virtual void write(byte b) throw ();
00057             virtual void write(const byte* data, size_t offset, size_t length) throw ();
00058 
00059             bool checkError() throw ();
00060             void print(bool) throw ();
00061             void print(jchar) throw ();
00062             void print(jint) throw ();
00063             void print(jlong) throw ();
00064             void print(jshort) throw ();
00065     //      void print(jfloat) throw ();
00066     //      void print(jdouble) throw ();
00067     //      void print(const char*) throw ();
00068             void print(const array<jchar>&) throw ();
00069             void print(const String&) throw ();
00070             void println() throw ();
00071             void println(bool) throw ();
00072             void println(jchar) throw ();
00073             void println(jint) throw ();
00074             void println(jlong) throw ();
00075             void println(jshort) throw ();
00076     //      void println(jfloat) throw ();
00077     //      void println(jdouble) throw ();
00078     //      void println(const char*) throw ();
00079             void println(const array<jchar>&) throw ();
00080             void println(const String&) throw ();
00081         };
00082     }
00083 }
00084 
00085 #endif
00086 
00087 #endif

Generated on Fri Jun 19 13:39:40 2009 for BeeCrypt C++ by  doxygen 1.5.8