code: private void parseIPv4(String name) throws IOException {
  
          // Parse name into byte-value address components
          int slashNdx = name.indexOf('/');
          if (slashNdx == -1) {
              address = InetAddress.getByName(name).getAddress();
          } else {
              address = new byte[8];
  
              // parse mask
              byte[] mask = InetAddress.getByName
                  (name.substring(slashNdx+1)).getAddress();
  
              // parse base address
              byte[] host = InetAddress.getByName
                  (name.substring(0, slashNdx)).getAddress();
  
              System.arraycopy(host, 0, address, 0, 4);
              System.arraycopy(mask, 0, address, 4, 4);
          }
      }
docs: Parse an IPv4 address.
  
  @param name IPv4 address with optional mask values
  @throws IOException on error