public void create(String filename, ucar.nc2.NetcdfFile ncfile, int extra, long preallocateSize, boolean largeFile) throws IOException { this.ncfile = ncfile; this.readonly = false; // finish any structures ncfile.finish(); raf = new ucar.unidata.io.RandomAccessFile(filename, "rw"); raf.order(RandomAccessFile.BIG_ENDIAN); if (preallocateSize > 0) { java.io.RandomAccessFile myRaf = raf.getRandomAccessFile(); myRaf.setLength(preallocateSize); } header = new N3header(); header.create(raf, ncfile, extra, largeFile, null); //recsize = header.recsize; // record size //recStart = header.recStart; // record variables start here //fileUsed = headerParser.getMinLength(); // track what is actually used _create(raf); if (fill) fillNonRecordVariables(); //else // raf.setMinLength(recStart); // make sure file length is long enough, even if not written to. }
@Override public void create(String filename, ucar.nc2.NetcdfFile ncfile, int extra, long preallocateSize, boolean largeFile) throws IOException { this.ncfile = ncfile; this.readonly = false; // finish any structures ncfile.finish(); raf = new ucar.unidata.io.RandomAccessFile(filename, "rw"); raf.order(RandomAccessFile.BIG_ENDIAN); if (preallocateSize > 0) { java.io.RandomAccessFile myRaf = raf.getRandomAccessFile(); myRaf.setLength(preallocateSize); } header = new N3header(); header.create(raf, ncfile, extra, largeFile, null); //recsize = header.recsize; // record size //recStart = header.recStart; // record variables start here //fileUsed = headerParser.getMinLength(); // track what is actually used _create(raf); if (fill) fillNonRecordVariables(); //else // raf.setMinLength(recStart); // make sure file length is long enough, even if not written to. }
@Override public void create(String filename, ucar.nc2.NetcdfFile ncfile, int extra, long preallocateSize, boolean largeFile) throws IOException { this.ncfile = ncfile; this.readonly = false; // finish any structures ncfile.finish(); raf = new ucar.unidata.io.RandomAccessFile(filename, "rw"); raf.order(RandomAccessFile.BIG_ENDIAN); if (preallocateSize > 0) { java.io.RandomAccessFile myRaf = raf.getRandomAccessFile(); myRaf.setLength(preallocateSize); } header = new N3header(); header.create(raf, ncfile, extra, largeFile, null); //recsize = header.recsize; // record size //recStart = header.recStart; // record variables start here //fileUsed = headerParser.getMinLength(); // track what is actually used _create(raf); if (fill) fillNonRecordVariables(); //else // raf.setMinLength(recStart); // make sure file length is long enough, even if not written to. }