public < S extends AddressSegment > void getSplitSegments ( S segs [ ] , int index , AddressSegmentCreator < S > creator ) { if ( ! isMultiple ( ) ) { int bitSizeSplit = IPv6Address . BITS_PER_SEGMENT >>> 1 ; Integer myPrefix = getSegmentPrefixLength ( ) ; Integer highPrefixBits = getSplitSegmentPrefix ( bitSizeSplit , myPrefix , 0 ) ; Integer lowPrefixBits = getSplitSegmentPrefix ( bitSizeSplit , myPrefix , 1 ) ; if ( index >= 0 && index < segs . length ) { segs [ index ] = creator . createSegment ( highByte ( ) , highPrefixBits ) ; } if ( ++ index >= 0 && index < segs . length ) { segs [ index ] = creator . createSegment ( lowByte ( ) , lowPrefixBits ) ; } } else { getSplitSegmentsMultiple ( segs , index , creator ) ; } }
Converts this IPv6 address segment into smaller segments copying them into the given array starting at the given index .