Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

PrintStream.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2004 Beeyond Software Holding 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_PRINTSTREAM_H
00024 #define _CLASS_PRINTSTREAM_H
00025 
00026 #ifdef __cplusplus
00027 
00028 #include "beecrypt/c++/array.h"
00029 using beecrypt::array;
00030 using beecrypt::bytearray;
00031 #include "beecrypt/c++/io/FilterOutputStream.h"
00032 using beecrypt::io::FilterOutputStream;
00033 
00034 #include <unicode/ucnv.h>
00035 
00036 namespace beecrypt {
00037     namespace io {
00040         class BEECRYPTCXXAPI PrintStream : public FilterOutputStream
00041         {
00042         private:
00043             bool _closed;
00044             bool _error;
00045             bool _flush;
00046             UConverter* _loc;
00047 
00048             void print(const UChar*, size_t) throw ();
00049 
00050         protected:
00051             void setError() throw ();
00052 
00053         public:
00054             PrintStream(OutputStream& out, bool autoflush = false, const char* encoding = 0);
00055             virtual ~PrintStream();
00056 
00057             virtual void close() throw ();
00058             virtual void flush() throw ();
00059             virtual void write(byte b) throw ();
00060             virtual void write(const byte* data, size_t offset, size_t length) throw ();
00061 
00062             bool checkError() throw ();
00063             void print(bool) throw ();
00064             void print(javachar) throw ();
00065             void print(javaint) throw ();
00066             void print(javalong) throw ();
00067             void print(javashort) throw ();
00068     //      void print(javafloat) throw ();
00069     //      void print(javadouble) throw ();
00070     //      void print(const char*) throw ();
00071             void print(const array<javachar>&) throw ();
00072             void print(const String&) throw ();
00073             void println() throw ();
00074             void println(bool) throw ();
00075             void println(javachar) throw ();
00076             void println(javaint) throw ();
00077             void println(javalong) throw ();
00078             void println(javashort) throw ();
00079     //      void println(javafloat) throw ();
00080     //      void println(javadouble) throw ();
00081     //      void println(const char*) throw ();
00082             void println(const array<javachar>&) throw ();
00083             void println(const String&) throw ();
00084         };
00085     }
00086 }
00087 
00088 #endif
00089 
00090 #endif

Generated on Mon Jun 20 08:10:33 2005 for BeeCrypt by  doxygen 1.4.0