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

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

本文整理了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

  1. @Override
  2. public void close() throws java.io.IOException {
  3. if (raf != null)
  4. raf.close();
  5. raf = null;
  6. }

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

  1. @Override
  2. public void close() throws java.io.IOException {
  3. if (raf != null)
  4. raf.close();
  5. if (stnRaf != null)
  6. stnRaf.close();
  7. raf = null;
  8. stnRaf = null;
  9. }

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

  1. public void close() throws java.io.IOException {
  2. if (stnRaf != null) stnRaf.close();
  3. if (dataRaf != null) dataRaf.close();
  4. stnRaf = null;
  5. dataRaf = null;
  6. }

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

  1. public void close() throws java.io.IOException {
  2. if (indexRaf != null) {
  3. indexRaf.close();
  4. indexRaf = null;
  5. }
  6. }

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

  1. @Override
  2. public void close() throws java.io.IOException {
  3. if (raf != null)
  4. raf.close();
  5. raf = null;
  6. }

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

  1. public void close() throws java.io.IOException {
  2. if (stnRaf != null) stnRaf.close();
  3. if (dataRaf != null) dataRaf.close();
  4. stnRaf = null;
  5. dataRaf = null;
  6. }

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

  1. /**
  2. * Close the file.
  3. * @throws IOException
  4. */
  5. public void close() throws IOException {
  6. if (raf != null) {
  7. raf.close();
  8. }
  9. }

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

  1. /**
  2. * Close the file.
  3. * @throws IOException
  4. */
  5. public void close() throws IOException {
  6. if (raf != null)
  7. raf.close();
  8. }

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

  1. /**
  2. * Close the file.
  3. * @throws IOException
  4. */
  5. public void close() throws IOException {
  6. if (raf != null)
  7. raf.close();
  8. }

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

  1. @Override
  2. public void close() throws java.io.IOException {
  3. if (raf != null)
  4. raf.close();
  5. raf = null;
  6. }

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

  1. public void release() throws IOException {
  2. if (raf != null)
  3. raf.close();
  4. raf = null;
  5. }

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

  1. public void close() throws java.io.IOException {
  2. if (stnRaf != null) stnRaf.close();
  3. if (dataRaf != null) dataRaf.close();
  4. stnRaf = null;
  5. dataRaf = null;
  6. }

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

  1. /**
  2. * Close the file.
  3. * @throws IOException
  4. */
  5. public void close() throws IOException {
  6. if (raf != null) {
  7. raf.close();
  8. }
  9. }

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

  1. @Override
  2. public void finish() {
  3. try {
  4. if (this.timeSeriesRaf != null && this.timeSeriesRaf != dataRaf) {
  5. timeSeriesRaf.close();
  6. timeSeriesRaf = null;
  7. }
  8. } catch (IOException e) {
  9. e.printStackTrace();
  10. }
  11. }

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

  1. @Override
  2. public void finish() {
  3. try {
  4. if (this.timeSeriesRaf != null && this.timeSeriesRaf != dataRaf) {
  5. timeSeriesRaf.close();
  6. timeSeriesRaf = null;
  7. }
  8. } catch (IOException e) {
  9. e.printStackTrace();
  10. }
  11. }

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

  1. @Override
  2. public void close() {
  3. try {
  4. if (this.timeSeriesRaf != null && this.timeSeriesRaf != dataRaf) {
  5. timeSeriesRaf.close();
  6. timeSeriesRaf = null;
  7. }
  8. } catch (IOException e) {
  9. e.printStackTrace();
  10. }
  11. }

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

  1. /**
  2. * Close this IOSP and associated files
  3. *
  4. * @throws IOException problem closing files
  5. */
  6. public void close() throws IOException {
  7. if (dataFile != null)
  8. dataFile.close();
  9. dataFile = null;
  10. super.close();
  11. }

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

  1. /**
  2. * Close this IOSP and associated files
  3. *
  4. * @throws IOException problem closing files
  5. */
  6. public void close() throws IOException {
  7. if (dataFile != null) {
  8. dataFile.close();
  9. }
  10. dataFile = null;
  11. super.close();
  12. }

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

  1. public void close() throws java.io.IOException {
  2. if (raf != null) {
  3. long size = header.calcFileSize();
  4. raf.setMinLength( size);
  5. raf.close();
  6. }
  7. raf = null;
  8. }

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

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

相关文章