public class IPRange extends Object
| コンストラクタと説明 |
|---|
IPRange(byte[] networkAddress,
int maskSize)
Constructor
|
IPRange(InetAddress networkAddress,
int maskSize)
Constructor
|
| 修飾子とタイプ | メソッドと説明 |
|---|---|
boolean |
contains(byte[] address)
Determines whether the given address is contained in the IP range.
|
boolean |
contains(InetAddress address)
Determines whether the given address is contained in the IP range.
|
static IPRange |
parseCIDRBlock(String cidrBlock)
Parses a CIDR block definition in to an IP range.
|
protected BitSet |
toBitSet(byte[] bytes)
Converts a byte array to a BitSet.
|
public IPRange(InetAddress networkAddress, int maskSize)
networkAddress - the network address for the rangemaskSize - the number of bits in the netmaskpublic IPRange(byte[] networkAddress,
int maskSize)
networkAddress - the network address for the rangemaskSize - the number of bits in the netmaskpublic static IPRange parseCIDRBlock(String cidrBlock)
cidrBlock - the CIDR block definitionpublic boolean contains(InetAddress address)
address - the address to checkpublic boolean contains(byte[] address)
address - the address to checkprotected BitSet toBitSet(byte[] bytes)
bytes - the byte array with most significant bit in element 0.Copyright © 2012. All Rights Reserved.