cdm/src/main/java/ucar/nc2/iosp/netcdf3/N3iosp.java
@Override
  public void flush() throws java.io.IOException {
    if (raf != null) {
      raf.flush();
      header.writeNumrecs();
      raf.flush();
    }
  }
@Override
  public void flush() throws java.io.IOException {
    if (raf != null) {
      raf.flush();
      header.writeNumrecs();
      raf.flush();
    }
  }
@ Override public void flush ( ) throws java . io . IOException { if ( raf != null ) { raf . flush ( ) ; header . writeNumrecs ( ) ; raf . flush ( ) ; } }
/* @Override
public boolean sync() throws IOException {
if (syncExtendOnly)
return syncExtend();

if (lastModified == 0) // ?? HttpRandomAccessFile
return false;

File file = new File(raf.getLocation());
if (file.exists()) {
long currentModified = file.lastModified();
if (currentModified == lastModified)
return false;

so things have been modified, heres where we need to reread the header !!
ncfile.empty();
open(raf, ncfile, null);
if (log.isDebugEnabled())
log.debug(" N3iosp resynced " + raf.getLocation() + " currentModified=" + currentModified + " lastModified= " + lastModified);
return true;
}

can this happen ?
throw new IOException("File does not exist");
}
/ * @Override public boolean sync () throws IOException { if ( syncExtendOnly ) return syncExtend () ;