public static class IP4AddressMask.IP4Mask extends Object
Constructor and Description |
---|
IP4Mask(int prefixLength)
Creates a subnet mask defined by a subnet mask prefix.
|
Modifier and Type | Method and Description |
---|---|
String |
asBitString()
Creates a bit string representation of the mask, which is a String of '1' and '0' characters.
|
byte[] |
asByteArray()
Returns a byte[] representation of the mask.
|
boolean |
equals(Object obj) |
int |
getPrefixLength() |
int |
hashCode() |
public IP4Mask(int prefixLength)
11110000.00000000.00000000.00000000
prefixLength
- the prefix length.public String asBitString()
public byte[] asByteArray()
10.0.0.0
the element
at index 0 has the value '10'.public int getPrefixLength()
Copyright © 2004–2017 52north.org. All rights reserved.