cdm/src/main/java/ucar/nc2/iosp/misc/Uspln.java
public boolean isValidFile(RandomAccessFile raf) throws IOException {
    raf.seek(0);
    int n = MAGIC.length();
    if (raf.length() < n) {
      return false;
    }

    String got = raf.readString(n);

    return (pMAGIC.matcher(got).find() || pMAGIC_OLD.matcher(got).find());
  }
public boolean isValidFile(RandomAccessFile raf) throws IOException {
    raf.seek(0);
    int n = MAGIC.length();
    if (raf.length() < n) {
      return false;
    }

    String got = raf.readString(n);

    return (pMAGIC.matcher(got).find() || pMAGIC_OLD.matcher(got).find());
  }
Check if this is a valid file for this IOServiceProvider.

@param raf RandomAccessFile
@return true if valid.
@throws IOException if read error