PrintStream.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
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
00066
00067
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
00077
00078
00079 void println(const array<jchar>&) throw ();
00080 void println(const String&) throw ();
00081 };
00082 }
00083 }
00084
00085 #endif
00086
00087 #endif