visad/src/main/java/ucar/nc2/iosp/vis5d/Vis5DIosp.java
public boolean isValidFile(RandomAccessFile raf) throws IOException {
    // quick test
    raf.order(RandomAccessFile.BIG_ENDIAN);
    raf.seek(0);
    String got = raf.readString(V5D.length());
    if (got.equals(V5D)) {
      return true;
    } else {  // more rigorous test
      V5DStruct vv;
      try {
        vv = V5DStruct.v5dOpenFile(raf);
      } catch (BadFormException bfe) {
        vv = null;
      }
      return vv != null;
    }
  }
public boolean isValidFile(RandomAccessFile raf) throws IOException {
    // quick test
    raf.order(RandomAccessFile.BIG_ENDIAN);
    raf.seek(0);
    String got = raf.readString(V5D.length());
    if (got.equals(V5D)) {
      return true;
    } else {  // more rigorous test
      V5DStruct vv;
      try {
        vv = V5DStruct.v5dOpenFile(raf);
      } catch (BadFormException bfe) {
        vv = null;
      }
      return vv != null;
    }
  }
Is this a valid file?

@param raf RandomAccessFile to check
@return true if a valid McIDAS AREA file
@throws IOException problem reading file