manually check if address is ipv4 because java implementation is untrustable