code: public Network getNetworkByName(final String networkName) throws DockerAccessException {
          for (Network el : docker.listNetworks()) {
              if (networkName.equals(el.getName())) {
                  return el;
              }
          }
          return null;
      }
docs: Get a network for a given network name.
  @param networkName name of network to lookup
  @return the network found or <code>null</code> if no network is available.
  @throws DockerAccessException in case of an remote error