Class IPv6AddressHelpers


  • public final class IPv6AddressHelpers
    extends java.lang.Object
    Helper methods used by IPv6Address.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.util.regex.Pattern DOT_DELIM  
    • Field Detail

      • DOT_DELIM

        private static final java.util.regex.Pattern DOT_DELIM
    • Constructor Detail

      • IPv6AddressHelpers

        public IPv6AddressHelpers()
    • Method Detail

      • parseStringArrayIntoLongArray

        static long[] parseStringArrayIntoLongArray​(java.lang.String[] strings)
      • validateLongs

        static void validateLongs​(long[] longs)
      • mergeLongArrayIntoIPv6Address

        static IPv6Address mergeLongArrayIntoIPv6Address​(long[] longs)
      • inHighRange

        static boolean inHighRange​(int shortNumber)
      • expandShortNotation

        static java.lang.String expandShortNotation​(java.lang.String string)
      • rewriteIPv4MappedNotation

        static java.lang.String rewriteIPv4MappedNotation​(java.lang.String string)
        Replaces a w.x.y.z substring at the end of the given string with corresponding hexadecimal notation. This is useful in case the string was using IPv4-Mapped address notation.
      • countOccurrences

        public static int countOccurrences​(java.lang.String haystack,
                                           char needle)
      • generateZeroes

        public static java.lang.String generateZeroes​(int number)
      • isLessThanUnsigned

        static boolean isLessThanUnsigned​(long a,
                                          long b)
      • prefixWithZeroBytes

        static byte[] prefixWithZeroBytes​(byte[] original,
                                          int newSize)