ucar.unidata.io.RandomAccessFile.close()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(3.7k)|赞(0)|评价(0)|浏览(168)

本文整理了Java中ucar.unidata.io.RandomAccessFile.close方法的一些代码示例,展示了RandomAccessFile.close的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RandomAccessFile.close方法的具体详情如下:
包路径:ucar.unidata.io.RandomAccessFile
类名称:RandomAccessFile
方法名:close

RandomAccessFile.close介绍

[英]Close the file, and release any associated system resources.
[中]关闭文件,释放所有相关的系统资源。

代码示例

代码示例来源:origin: edu.ucar/netcdf

@Override
public void close() throws java.io.IOException {
 if (raf != null)
  raf.close();
 raf = null;
}

代码示例来源:origin: edu.ucar/netcdf

@Override
public void close() throws java.io.IOException {
 if (raf != null)
  raf.close();
 if (stnRaf != null)
  stnRaf.close();
 raf = null;
 stnRaf = null;
}

代码示例来源:origin: edu.ucar/cdm

public void close() throws java.io.IOException {
 if (stnRaf != null) stnRaf.close();
 if (dataRaf != null) dataRaf.close();
 stnRaf = null;
 dataRaf = null;
}

代码示例来源:origin: Unidata/thredds

public void close() throws java.io.IOException {
 if (indexRaf != null) {
  indexRaf.close();
  indexRaf = null;
 }
}

代码示例来源:origin: Unidata/thredds

@Override
public void close() throws java.io.IOException {
 if (raf != null)
  raf.close();
 raf = null;
}

代码示例来源:origin: Unidata/thredds

public void close() throws java.io.IOException {
 if (stnRaf != null) stnRaf.close();
 if (dataRaf != null) dataRaf.close();
 stnRaf = null;
 dataRaf = null;
}

代码示例来源:origin: edu.ucar/netcdf

/**
 *  Close the file.
 * @throws IOException
 */
public void close() throws IOException {
  if (raf != null) {
    raf.close();
  }
}

代码示例来源:origin: edu.ucar/netcdf

/**
*  Close the file.
* @throws IOException
*/
public void close() throws IOException {
  if (raf != null)
   raf.close();
}

代码示例来源:origin: edu.ucar/cdm

/**
*  Close the file.
* @throws IOException
*/
public void close() throws IOException {
  if (raf != null)
   raf.close();
}

代码示例来源:origin: edu.ucar/cdm

@Override
public void close() throws java.io.IOException {
 if (raf != null)
  raf.close();
 raf = null;
}

代码示例来源:origin: Unidata/thredds

public void release() throws IOException {
 if (raf != null)
  raf.close();
 raf = null;
}

代码示例来源:origin: edu.ucar/netcdf

public void close() throws java.io.IOException {
 if (stnRaf != null) stnRaf.close();
 if (dataRaf != null) dataRaf.close();
 stnRaf = null;
 dataRaf = null;
}

代码示例来源:origin: edu.ucar/cdm

/**
 *  Close the file.
 * @throws IOException
 */
public void close() throws IOException {
  if (raf != null) {
    raf.close();
  }
}

代码示例来源:origin: edu.ucar/netcdf

@Override
public void finish() {
 try {
  if (this.timeSeriesRaf != null && this.timeSeriesRaf != dataRaf) {
   timeSeriesRaf.close();
   timeSeriesRaf = null;
  }
 } catch (IOException e) {
  e.printStackTrace();
 }
}

代码示例来源:origin: edu.ucar/cdm

@Override
public void finish() {
 try {
  if (this.timeSeriesRaf != null && this.timeSeriesRaf != dataRaf) {
   timeSeriesRaf.close();
   timeSeriesRaf = null;
  }
 } catch (IOException e) {
  e.printStackTrace();
 }
}

代码示例来源:origin: Unidata/thredds

@Override
public void close() {
 try {
  if (this.timeSeriesRaf != null && this.timeSeriesRaf != dataRaf) {
   timeSeriesRaf.close();
   timeSeriesRaf = null;
  }
 } catch (IOException e) {
  e.printStackTrace();
 }
}

代码示例来源:origin: Unidata/thredds

/**
 * Close this IOSP and associated files
 *
 * @throws IOException problem closing files
 */
public void close() throws IOException {
 if (dataFile != null)
  dataFile.close();
 dataFile = null;
 super.close();
}

代码示例来源:origin: edu.ucar/cdm

/**
 * Close this IOSP and associated files
 *
 * @throws IOException problem closing files
 */
public void close() throws IOException {
 if (dataFile != null) {
  dataFile.close();
 }
 dataFile = null;
 super.close();
}

代码示例来源:origin: edu.ucar/netcdf

public void close() throws java.io.IOException {
 if (raf != null) {
  long size = header.calcFileSize();
  raf.setMinLength( size);
  raf.close();
 }
 raf = null;
}

代码示例来源:origin: edu.ucar/netcdf

private static void dump(String filename) throws IOException {
 System.out.printf("Dump %s%n", filename);
 RandomAccessFile raf = new RandomAccessFile(filename, "r");
 NetcdfFile ncfile = new MyNetcdfFile();
 // its a netcdf-3 file
 raf.order(RandomAccessFile.BIG_ENDIAN);
 N3header headerParser = new N3header();
 headerParser.read(raf, ncfile, new Formatter(System.out));
 raf.close();
}

相关文章