Class InetAddr

  • Direct Known Subclasses:
    CidrAddr

    public class InetAddr
    extends java.lang.Object
    • Field Detail

      • address

        protected byte[] address
      • maskBits

        protected short maskBits
    • Constructor Detail

      • InetAddr

        protected InetAddr​(java.lang.Object[] parts)
      • InetAddr

        public InetAddr​(byte[] address,
                        short maskBits)
      • InetAddr

        public InetAddr​(java.lang.String cidrAddress)
                 throws java.lang.IllegalArgumentException
        Throws:
        java.lang.IllegalArgumentException
    • Method Detail

      • getAddress

        public byte[] getAddress()
      • setAddress

        public void setAddress​(byte[] address)
      • getMaskAddress

        public byte[] getMaskAddress()
      • getMaskBits

        public int getMaskBits()
      • setMaskBits

        public void setMaskBits​(short maskBits)
      • parseInetAddr

        public static InetAddr parseInetAddr​(java.lang.String inetAddr)
      • parseInetAddr

        public static InetAddr parseInetAddr​(java.lang.String inetAddr,
                                             boolean allowShorthandNotation)
      • parseInetAddr

        public static InetAddr parseInetAddr​(java.lang.String inetAddr,
                                             boolean allowShortNotation,
                                             InetAddr.Family family)
      • parseN

        protected static java.lang.Object[] parseN​(java.lang.String inetAddr,
                                                   boolean allowShortNotation)
      • parseN

        protected static java.lang.Object[] parseN​(java.lang.String inetAddr,
                                                   boolean allowShortNotation,
                                                   InetAddr.Family family)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • toInetAddress

        public java.net.InetAddress toInetAddress()