code: public Integer getBlockMaskPrefixLength(boolean network) {
  		Integer prefixLen;
  		if(network) {
  			if(hasNoPrefixCache() || (prefixLen = prefixCache.networkMaskPrefixLen) == null) {
  				prefixLen = setNetworkMaskPrefix(checkForPrefixMask(network));
  			}
  		} else {
  			if(hasNoPrefixCache() || (prefixLen = prefixCache.hostMaskPrefixLen) == null) {
  				prefixLen = setHostMaskPrefix(checkForPrefixMask(network));
  			}
  		}
  		if(prefixLen < 0) {
  			return null;
  		}
  		return prefixLen;
  	}
docs: If this address section is equivalent to the mask for a CIDR prefix block, it returns that prefix length.
  Otherwise, it returns null.
  A CIDR network mask is an address with all 1s in the network section and then all 0s in the host section.
  A CIDR host mask is an address with all 0s in the network section and then all 1s in the host section.
  The prefix length is the length of the network section.
  
  Also, keep in mind that the prefix length returned by this method is not equivalent to the prefix length used to construct this object.
  The prefix length used to construct indicates the network and host section of this address.
  The prefix length returned here indicates the whether the value of this address can be used as a mask for the network and host
  section of any other address.  Therefore the two values can be different values, or one can be null while the other is not.
  
  This method applies only to the lower value of the range if this section represents multiple values.
  
  @param network whether to check for a network mask or a host mask
  @return the prefix length corresponding to this mask, or null if there is no such prefix length