Class IpRangeParser
java.lang.Object
com.nerjal.ip_range_parser.IpRangeParser
The
IpRangeParser class provides utility methods for parsing IP range data from
files, converting them into CIDR (Classless Inter-Domain Routing) notation, and
serializing the result into JSON format. It supports both IPv4 and IPv6 address ranges.
The parsed IP ranges are grouped and optimized for efficient representation and storage
in CIDR notation.-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
IpRangeParser
public IpRangeParser()
-
-
Method Details
-
main
-
parse
Parses IPv4 and IPv6 data files and writes the resulting JSON data to the specified output file. The method processes the data from the two input files, transforms the IP ranges into CIDR notations, and outputs the structured data as a JSON object.- Parameters:
outputFile- the file to which the generated JSON data will be written.ipv4file- the file containing IPv4 data with IP ranges to be parsed.ipv6file- the file containing IPv6 data with IP ranges to be parsed.
-