cdm/src/main/java/ucar/nc2/dataset/DatasetUrl.java
static private ServiceType checkIfCdmr(String location) throws IOException {

    try (HTTPMethod method = HTTPFactory.Head(location + "?req=header")) {
      int statusCode = method.execute();
      if (statusCode >= 300) {
        if (statusCode == HttpStatus.SC_UNAUTHORIZED || statusCode == HttpStatus.SC_FORBIDDEN)
          throw new IOException("Unauthorized to open dataset " + location);
        else
          throw new IOException(location + " is not a valid URL, return status=" + statusCode);
      }

      Header h = method.getResponseHeader("Content-Description");
      if ((h != null) && (h.getValue() != null)) {
        String v = h.getValue();
        if (v.equalsIgnoreCase("ncstream"))
          return ServiceType.CdmRemote;
      }
    }
    return null;
  }
static private ServiceType checkIfCdmr(String location) throws IOException {

    try (HTTPMethod method = HTTPFactory.Head(location + "?req=header")) {
      int statusCode = method.execute();
      if (statusCode >= 300) {
        if (statusCode == HttpStatus.SC_UNAUTHORIZED || statusCode == HttpStatus.SC_FORBIDDEN)
          throw new IOException("Unauthorized to open dataset " + location);
        else
          throw new IOException(location + " is not a valid URL, return status=" + statusCode);
      }

      Header h = method.getResponseHeader("Content-Description");
      if ((h != null) && (h.getValue() != null)) {
        String v = h.getValue();
        if (v.equalsIgnoreCase("ncstream"))
          return ServiceType.CdmRemote;
      }
    }
    return null;
  }
static private ServiceType checkIfCdmr ( String location ) throws IOException { try ( HTTPMethod method = HTTPFactory . Head ( location + "?req=header" ) ) { int statusCode = method . execute ( ) ; if ( statusCode >= 300 ) { if ( statusCode == HttpStatus . SC_UNAUTHORIZED || statusCode == HttpStatus . SC_FORBIDDEN ) throw new IOException ( "Unauthorized to open dataset " + location ) ; else throw new IOException ( location + " is not a valid URL, return status=" + statusCode ) ; } Header h = method . getResponseHeader ( "Content-Description" ) ; if ( ( h != null ) && ( h . getValue ( ) != null ) ) { String v = h . getValue ( ) ; if ( v . equalsIgnoreCase ( "ncstream" ) ) return ServiceType . CdmRemote ; } } return null ; }
cdmremote
cdmremote