Class SubnetUtil


  • public class SubnetUtil
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected int prefixLen  
      protected byte[] rawAddress  
    • Constructor Summary

      Constructors 
      Constructor Description
      SubnetUtil​(java.net.InetAddress addr, int prefixLength)  
      SubnetUtil​(java.net.InterfaceAddress addr)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean sameSubnet​(java.net.InetAddress addr)  
      boolean sameSubnet​(java.net.InetAddress addr, int prefixLength)  
      boolean sameSubnet​(java.net.InterfaceAddress addr)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • rawAddress

        protected final byte[] rawAddress
      • prefixLen

        protected final int prefixLen
    • Constructor Detail

      • SubnetUtil

        public SubnetUtil​(java.net.InetAddress addr,
                          int prefixLength)
      • SubnetUtil

        public SubnetUtil​(java.net.InterfaceAddress addr)
    • Method Detail

      • sameSubnet

        public boolean sameSubnet​(java.net.InetAddress addr)
      • sameSubnet

        public boolean sameSubnet​(java.net.InetAddress addr,
                                  int prefixLength)
      • sameSubnet

        public boolean sameSubnet​(java.net.InterfaceAddress addr)