/** * Open an existing Netcdf file for writing data. * * @param location open an existing file at this location * @deprecated use openExisting(String filename, boolean fill) * @throws java.io.IOException on read error */ public NetcdfFileWriteable(String location) throws IOException { super(); this.location = location; ucar.unidata.io.RandomAccessFile raf = new ucar.unidata.io.RandomAccessFile(location, "rw"); spi = SPFactory.getServiceProvider(); spiw = (IOServiceProviderWriter) spi; spiw.open(raf, this, null); }
/** * Open an existing Netcdf file for writing data. * * @param location open an existing file at this location * @deprecated use openExisting(String filename, boolean fill) * @throws java.io.IOException on read error */ public NetcdfFileWriteable(String location) throws IOException { super(); this.location = location; ucar.unidata.io.RandomAccessFile raf = new ucar.unidata.io.RandomAccessFile(location, "rw"); spi = SPFactory.getServiceProvider(); spiw = (IOServiceProviderWriter) spi; spiw.open(raf, this, null); }
/** * After you have added all of the Dimensions, Variables, and Attributes, * call create() to actually create the file. You must be in define mode. * After this call, you are no longer in define mode. * @throws java.io.IOException if I/O error */ public void create() throws java.io.IOException { if (!defineMode) throw new UnsupportedOperationException("not in define mode"); if (cached_spiw == null) { spi = SPFactory.getServiceProvider(); spiw = (IOServiceProviderWriter) spi; } else { spiw = cached_spiw; spi = spiw; } spiw.setFill( fill); spiw.create(location, this, extraHeader, preallocateSize, isLargeFile); defineMode = false; }
/** * Open an existing Netcdf file for writing data. * * @param location open an existing file at this location * @deprecated use openExisting(String filename, boolean fill) * @throws java.io.IOException on read error */ public NetcdfFileWriteable(String location) throws IOException { super(); this.location = location; ucar.unidata.io.RandomAccessFile raf = new ucar.unidata.io.RandomAccessFile(location, "rw"); spi = SPFactory.getServiceProvider(); spiw = (IOServiceProviderWriter) spi; spiw.open(raf, this, null); }
/** * After you have added all of the Dimensions, Variables, and Attributes, * call create() to actually create the file. You must be in define mode. * After this call, you are no longer in define mode. * @throws java.io.IOException if I/O error */ public void create() throws java.io.IOException { if (!defineMode) throw new UnsupportedOperationException("not in define mode"); if (cached_spiw == null) { spi = SPFactory.getServiceProvider(); spiw = (IOServiceProviderWriter) spi; } else { spiw = cached_spiw; spi = spiw; } spiw.setFill( fill); spiw.create(location, this, extraHeader, preallocateSize, isLargeFile); defineMode = false; }
/** * After you have added all of the Dimensions, Variables, and Attributes, * call create() to actually create the file. You must be in define mode. * After this call, you are no longer in define mode. * @throws java.io.IOException if I/O error */ public void create() throws java.io.IOException { if (!defineMode) throw new UnsupportedOperationException("not in define mode"); if (cached_spiw == null) { spi = SPFactory.getServiceProvider(); spiw = (IOServiceProviderWriter) spi; } else { spiw = cached_spiw; spi = spiw; } spiw.setFill( fill); spiw.create(location, this, extraHeader, preallocateSize, isLargeFile); defineMode = false; }
/** * This can only be used for netcdf-3 files served over HTTP * * @param url HTTP URL location * @throws java.io.IOException if error * @deprecated use NetcdfFile.open( http:location) or NetcdfDataset.openFile( http:location) */ public NetcdfFile(URL url) throws IOException { this.location = url.toString(); ucar.unidata.io.RandomAccessFile raf = new ucar.unidata.io.http.HTTPRandomAccessFile(location); this.spi = SPFactory.getServiceProvider(); spi.open(raf, this, null); finish(); }
/** * This can only be used for netcdf-3 files served over HTTP * * @param url HTTP URL location * @throws java.io.IOException if error * @deprecated use NetcdfFile.open( http:location) or NetcdfDataset.openFile( http:location) */ public NetcdfFile(URL url) throws IOException { this.location = url.toString(); ucar.unidata.io.RandomAccessFile raf = new ucar.unidata.io.http.HTTPRandomAccessFile(location); this.spi = SPFactory.getServiceProvider(); spi.open(raf, this, null); finish(); }
/** * This can only be used for netcdf-3 files served over HTTP * * @param url HTTP URL location * @throws java.io.IOException if error * @deprecated use NetcdfFile.open( http:location) or NetcdfDataset.openFile( http:location) */ public NetcdfFile(URL url) throws IOException { this.location = url.toString(); ucar.unidata.io.RandomAccessFile raf = new ucar.unidata.io.http.HTTPRandomAccessFile(location); this.spi = SPFactory.getServiceProvider(); spi.open(raf, this, null); finish(); }
spi = SPFactory.getServiceProvider();
spi = SPFactory.getServiceProvider();
spi = SPFactory.getServiceProvider();
/** * This is can only be used for local netcdf-3 files. * * @param filename location * @throws java.io.IOException if error * @deprecated use NetcdfFile.open( location) or NetcdfDataset.openFile( location) */ public NetcdfFile(String filename) throws IOException { this.location = filename; ucar.unidata.io.RandomAccessFile raf = ucar.unidata.io.RandomAccessFile.acquire(filename); //ucar.unidata.io.RandomAccessFile raf = new ucar.unidata.io.MMapRandomAccessFile(filename, "r"); this.spi = SPFactory.getServiceProvider(); spi.open(raf, this, null); finish(); }
/** * This is can only be used for local netcdf-3 files. * * @param filename location * @throws java.io.IOException if error * @deprecated use NetcdfFile.open( location) or NetcdfDataset.openFile( location) */ public NetcdfFile(String filename) throws IOException { this.location = filename; ucar.unidata.io.RandomAccessFile raf = new ucar.unidata.io.RandomAccessFile(filename, "r"); //ucar.unidata.io.RandomAccessFile raf = new ucar.unidata.io.MMapRandomAccessFile(filename, "r"); this.spi = SPFactory.getServiceProvider(); spi.open(raf, this, null); finish(); }
/** * This is can only be used for local netcdf-3 files. * * @param filename location * @throws java.io.IOException if error * @deprecated use NetcdfFile.open( location) or NetcdfDataset.openFile( location) */ public NetcdfFile(String filename) throws IOException { this.location = filename; ucar.unidata.io.RandomAccessFile raf = new ucar.unidata.io.RandomAccessFile(filename, "r"); //ucar.unidata.io.RandomAccessFile raf = new ucar.unidata.io.MMapRandomAccessFile(filename, "r"); this.spi = SPFactory.getServiceProvider(); spi.open(raf, this, null); finish(); }
if (iospw == null) { raf = new ucar.unidata.io.RandomAccessFile(location, "rw"); spi = SPFactory.getServiceProvider(); spiw = (IOServiceProviderWriter) spi; } else {
if (iospw == null) { raf = new ucar.unidata.io.RandomAccessFile(location, "rw"); spi = SPFactory.getServiceProvider(); spiw = (IOServiceProviderWriter) spi; } else {
if (iospw == null) { raf = new ucar.unidata.io.RandomAccessFile(location, "rw"); spi = SPFactory.getServiceProvider(); spiw = (IOServiceProviderWriter) spi; } else {