public void decodeBER(BERInputStream inputStream) throws java.io.IOException {
BER.MutableByte type = new BER.MutableByte();
byte[] value = BER.decodeString(inputStream, type);
if (type.getValue() != BER.IPADDRESS) {
throw new IOException("Wrong type encountered when decoding Counter: "+
type.getValue());
}
//if remove this length check, ipv6 address will be support.
if (value.length != 4) {
-
throw new IOException("IpAddress encoding error, wrong length: " +*
-
value.length);*
- }*
inetAddress = InetAddress.getByAddress(value);
}