ip calculator in core java