Package org.apache.nutch.protocol.okhttp

# Class CIDR

java.lang.Object
org.apache.nutch.protocol.okhttp.CIDR

public class CIDR extends Object
Parse a CIDR block notation and test whether an IP address is contained in the subnet range defined by the CIDR.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `CIDR(String cidr)`
  `CIDR(InetAddress address, int mask)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `contains(InetAddress address)`
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### CIDR

    public CIDR(InetAddress address, int mask) throws IllegalArgumentException
    Throws:
      `IllegalArgumentException`

  - ### CIDR

    public CIDR(String cidr) throws IllegalArgumentException
    Throws:
      `IllegalArgumentException`

- ## Method Details

  - ### contains

    public boolean contains(InetAddress address)

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`