CharsetEncoder.h

Go to the documentation of this file.
00001 #ifndef JAVA_IO_CHARSETENCODER_H
00002 #define JAVA_IO_CHARSETENCODER_H 1
00003 
00004 #ifndef JAVA_IO_CHARSETCODER_H
00005 #include <java_io/CharsetCoder.h>
00006 #endif /* JAVA_IO_CHARSETCODER_H */
00007 
00008 namespace java {
00009   namespace io {
00010 
00103     class JAVA_IO_SPEC CharsetEncoder : public CharsetCoder {
00104 
00105     public:
00106   
00123       jboolean isLegalReplacement(const String& repl) const;
00124 
00161       Ref<CoderResult> flush(Array<jbyte>& out);
00162 
00259       Ref<CoderResult> encode
00260         (Array<jchar>& in,
00261          Array<jbyte>& out,
00262          jboolean endOfInput);
00263 
00295       Array<jbyte> encode(Array<jchar>& in);
00296 
00319       jboolean canEncode(const Array<jchar>& in);
00320 
00321     protected:
00322 
00343       CharsetEncoder
00344         (const Ref<Charset>& cs,
00345          jfloat averageRatio,
00346          jfloat maxRatio,
00347          const String& replace = "?");
00348 
00363       virtual Ref<CoderResult> implFlush(Array<jbyte>& out);
00364 
00400       virtual Ref<CoderResult> encodeLoop(Array<jchar>& in, Array<jbyte>& out) = 0;
00401 
00402     private:
00403 
00404       REGISTER_MEMBERS;
00405 
00406     };
00407 
00408   } // namespace io
00409 } // namespace java
00410 
00411 #endif /* JAVA_IO_CHARSETENCODER_H */

Generated on Fri May 16 11:54:42 2008 for CrossPlatformJavaLikeC++API by  doxygen 1.5.3