Charset.h

Go to the documentation of this file.
00001 #ifndef JAVA_IO_CHARSET_H
00002 #define JAVA_IO_CHARSET_H 1
00003 
00004 #ifndef JAVA_LANG_COMPARABLE_H
00005 #include <java_lang/Comparable.h>
00006 #endif /* JAVA_LANG_COMPARABLE_H */
00007 #ifndef JAVA_UTIL_SORTEDMAP_H
00008 #include <java_util/SortedMap.h>
00009 #endif /* JAVA_UTIL_SORTEDMAP_H */
00010 
00011 namespace java {
00012   namespace io {
00013 
00014     class CharsetDecoder;
00015     class CharsetEncoder;
00016 
00229     class JAVA_IO_SPEC Charset : public Comparable {
00230 
00231     public:
00232 
00246       static jboolean isSupported(const String& charsetName);
00247 
00264       static Ref<Charset> forName(const String& charsetName);
00265 
00292       static Ref<java::util::SortedMap> availableCharset();
00293 
00299       virtual String name() const;
00300 
00306       virtual Array<String> aliases() const;      
00307 
00317       virtual String displayName() const;
00318 
00327       jboolean isRegistered() const;
00328 
00354       virtual jboolean contains(const Charset& c) const;
00355 
00361       virtual Ref<CharsetDecoder> newDecoder() const = 0;
00362 
00368       virtual Ref<CharsetEncoder> newEncoder() const = 0;
00369 
00395       Array<jchar> decode(Array<jbyte>& bb);
00396 
00422       Array<jbyte> encode(Array<jchar>& cb);
00423 
00437       virtual jboolean canEncode() const;
00438 
00451       virtual jint compareTo(const Object& obj) const;
00452 
00458       virtual jint hashCode() const;
00459 
00469       virtual jboolean equals(const Object& o) const;
00470 
00476       virtual String toString() const;
00477 
00478     protected:
00479 
00480       Charset(const String& canonicalName);
00481       Charset(const String& canonicalName, const Array<String>& aliases);
00482       Array<String> _aliases;
00483 
00484     private:
00485 
00486       String _name;
00487 
00488       REGISTER_MEMBERS;
00489 
00490     };
00491 
00492   } // namespace io
00493 } // namespace java
00494 
00495 #endif /* JAVA_IO_CHARSET_H */

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