Inet6Address.h

Go to the documentation of this file.
00001 #ifndef JAVA_NET_INET6ADDRESS_H
00002 #define JAVA_NET_INET6ADDRESS_H 1
00003 
00004 #ifndef JAVA_NET_INETADDRESS_H
00005 #include <java_net/InetAddress.h>
00006 #endif /* JAVA_NET_INETADDRESS_H */
00007 #ifndef JAVA_NET_SPEC
00008 #include <java_net/Spec.h>
00009 #endif /* JAVA_NET_SPEC */
00010 
00011 namespace java {
00012   namespace net {
00013 
00113     class JAVA_NET_SPEC Inet6Address : public InetAddress {
00114 
00115     public:
00116 
00117       static const jint INADDRSZ;
00118 
00119       /*
00120        * Convert IPv6 binary address into presentation (printable) format.
00121        *
00122        * @param src a byte array representing the IPv6 numeric address
00123        * @return a String representing an IPv6 address in 
00124        *         textual representation format
00125        * @since 1.4
00126        */
00127       static String numericToTextFormat(const Array<jbyte>& address);
00128 
00129       /* 
00130        * Convert IPv6 presentation level address to network order binary form.
00131        * credit:
00132        *  Converted from C code from Solaris 8 (inet_pton)
00133        *
00134        * @param src a String representing an IPv6 address in textual format
00135        * @return a byte array representing the IPv6 numeric address
00136        * @since 1.4
00137        */
00138       static Ref<Array<jbyte> > textToNumericFormat(const String& src);
00139 
00147       static jboolean isIPv4MappedAddress(const Array<jbyte>& addr);
00148 
00149       static Ref<Array<jbyte> > convertFromIPv4MappedAddress(const Array<jbyte>& addr);
00150 
00151       Inet6Address();
00152 
00153       Inet6Address(const String& hostName, const Array<jbyte>& addr);
00154 
00164       virtual jboolean isMulticastAddress() const;
00165 
00172       virtual jboolean isAnyLocalAddress() const;
00173   
00181       virtual jboolean isLoopbackAddress() const;
00182 
00190       virtual jboolean isLinkLocalAddress() const;
00191 
00199       virtual jboolean isSiteLocalAddress() const;
00200 
00210   virtual jboolean isMCGlobal() const;
00211 
00220       virtual jboolean isMCNodeLocal() const;
00221   
00230       virtual jboolean isMCLinkLocal() const;
00231 
00240       virtual jboolean isMCSiteLocal() const;
00241 
00251       virtual jboolean isMCOrgLocal() const;
00252 
00259       String getHostAddress() const;
00260 
00261     private:
00262 
00263       REGISTER_MEMBERS;
00264 
00265     };
00266 
00267   } // namespace net
00268 } // namespace java
00269 
00270 #endif /* JAVA_NET_INET6ADDRESS_H */

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