Class CIDRNetmask


  • public class CIDRNetmask
    extends java.lang.Object
    Netmask that is the number of significant bits.
    • Constructor Summary

      Constructors 
      Constructor Description
      CIDRNetmask​(int n)  
      CIDRNetmask​(java.lang.String s)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String toString()  
      protected void write​(java.nio.ByteBuffer buf)
      Write the netmask into a byte buffer.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • CIDRNetmask

        public CIDRNetmask​(java.lang.String s)
      • CIDRNetmask

        public CIDRNetmask​(int n)
    • Method Detail

      • write

        protected void write​(java.nio.ByteBuffer buf)
        Write the netmask into a byte buffer. Throw InvalidNetmaskException if negative or if the size exceeds the size of the address type inferred from the remaining buffer space (which must be 4 bytes for IPv4 and 16 bytes for IPv6). exceeds the size of the buffer
      • toString

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