Class Ipv6Parser


  • public class Ipv6Parser
    extends Object
    Ipv6Parser parses an IPv6 address literal and convert it to an Inet6Address. For example:
    • 2001:db8:0:0:0:0:0:0
    • 2001:db8::
    • 2001:db8::1
    • ::1
    • 2001:db8::192.0.2.0

    Grammar:

     IPv6         := [NUM_SEQENCE] ENDING
     NUM_SEQENCE  := NUM *(: NUM)
     NUM          := 1*4HEXDIG
     ENDING       := :: [NUM_SEQENCE [. IPv4Rest]]
                   | . IPv4Rest
                   | E
     IPv4Rest     := NUM . NUM . NUM
     
    • Constructor Detail

      • Ipv6Parser

        public Ipv6Parser​(String address)
                   throws java.text.ParseException
        Throws:
        java.text.ParseException
      • Ipv6Parser

        public Ipv6Parser​(CharScanner charScanner)
                   throws java.text.ParseException
        Throws:
        java.text.ParseException
    • Method Detail

      • parseLeft

        public Ipv6Parser.Ipv6 parseLeft()
                                  throws java.text.ParseException
        Throws:
        java.text.ParseException
      • parse

        public Ipv6Parser.Ipv6 parse()
                              throws java.text.ParseException
        Throws:
        java.text.ParseException