code: private static boolean checkIpv6(byte[] bytes, int pos, int length) {
  		boolean shortHand = false;  // denotes usage of ::
  		int numCount = 0;
  		int blocksCount = 0;
  		int start = 0;
  		while (pos < length) {
  			if (bytes[pos] == ':') {
  				start = pos;
  				blocksCount++;
  				numCount = 0;
  				if (pos > 0 && bytes[pos - 1] == ':') {
  					if (shortHand) return false;
  					else {
  						shortHand = true;
  					}
  				}
  			} else if (bytes[pos] == '.') {
  				return checkIpv4(bytes, start + 1, length - start + 1);
  			} else {
  				if (Character.digit(bytes[pos], 16) == -1) {
  					return false;
  				}
  				numCount++;
  				if (numCount > 4) {
  					return false;
  				}
  			}
  			pos++;
  		}
  		return blocksCount > 6 || shortHand;
  	}
docs: /*
  http://stackoverflow.com/questions/5963199/ipv6-validation
  rfc4291
  
  IPV6 addresses are represented as 8, 4 hex digit groups of numbers
  2001:0db8:11a3:09d7:1f34:8a2e:07a0:765d
  
  leading zeros are not necessary, however at least one digit should be present
  
  the null group ':0000:0000:0000'(one or more) could be substituted with '::' once per address
  
  x:x:x:x:x:x:d.d.d.d - 6 ipv6 + 4 ipv4
  ::d.d.d.d