Inet4Address.h

Go to the documentation of this file.
00001 #ifndef JAVA_NET_INET4ADDRESS_H
00002 #define JAVA_NET_INET4ADDRESS_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 
00066     class JAVA_NET_SPEC Inet4Address : public InetAddress {
00067 
00068     public:
00069 
00070       static const jint INADDRSZ;
00071 
00072       /* 
00073        * Converts IPv4 binary address into a string suitable for presentation.
00074        *
00075        * @param src a byte array representing an IPv4 numeric address
00076        * @return a String representing the IPv4 address in 
00077        *         textual representation format
00078        * @since 1.4
00079        */
00080       static String numericToTextFormat(const Array<jbyte>& address);
00081 
00082       /*
00083        * Converts IPv4 address in its textual presentation form 
00084        * into its numeric binary form.
00085        * 
00086        * @param src a String representing an IPv4 address in standard format
00087        * @return a byte array representing the IPv4 numeric address
00088        * @since 1.4
00089        */
00090       static Ref<Array<jbyte> > textToNumericFormat(const String& src);
00091 
00092       Inet4Address();
00093 
00094       Inet4Address(const String& hostName, const Array<jbyte>& addr);
00095 
00104       virtual jboolean isMulticastAddress() const;
00105 
00112       virtual jboolean isAnyLocalAddress() const;
00113   
00121       virtual jboolean isLoopbackAddress() const;
00122 
00130       virtual jboolean isLinkLocalAddress() const;
00131 
00139       virtual jboolean isSiteLocalAddress() const;
00140 
00149       virtual jboolean isMCGlobal() const;
00150 
00159       virtual jboolean isMCNodeLocal() const;
00160   
00169       virtual jboolean isMCLinkLocal() const;
00170 
00179       virtual jboolean isMCSiteLocal() const;
00180 
00190       virtual jboolean isMCOrgLocal() const;
00191 
00198       String getHostAddress() const;
00199 
00200     private:
00201 
00202       REGISTER_MEMBERS;
00203 
00204     };
00205 
00206   } // namespace net
00207 } // namespace java
00208 
00209 #endif /* JAVA_NET_INET4ADDRESS_H */

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