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

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

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

RandomAccessFile.getBufferSize介绍

[英]Get the buffer size
[中]获取缓冲区大小

代码示例

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

  1. @Override
  2. public boolean isValidFile(RandomAccessFile raf) throws IOException {
  3. if (raf instanceof HTTPRandomAccessFile) { // only do remote if memory resident
  4. if (raf.length() > raf.getBufferSize())
  5. return false;
  6. } else { // wont accept remote index
  7. GribCdmIndex.GribCollectionType type = GribCdmIndex.getType(raf);
  8. if (type == GribCdmIndex.GribCollectionType.GRIB1) return true;
  9. if (type == GribCdmIndex.GribCollectionType.Partition1) return true;
  10. }
  11. // check for GRIB1 data file
  12. return Grib1RecordScanner.isValidFile(raf);
  13. }

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

  1. @Override
  2. public boolean isValidFile(RandomAccessFile raf) throws IOException {
  3. if (raf instanceof HTTPRandomAccessFile) { // only do remote if memory resident
  4. if (raf.length() > raf.getBufferSize())
  5. return false;
  6. } else { // wont accept remote index
  7. GribCdmIndex.GribCollectionType type = GribCdmIndex.getType(raf);
  8. if (type == GribCdmIndex.GribCollectionType.GRIB2) return true;
  9. if (type == GribCdmIndex.GribCollectionType.Partition2) return true;
  10. }
  11. // check for GRIB2 data file
  12. return Grib2RecordScanner.isValidFile(raf);
  13. }

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

  1. int count = 0;
  2. int rafBufferSize = inputRaf.getBufferSize();
  3. inputRaf.setBufferSize( Grib2WriteIndex.indexRafBufferSize );

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

  1. int count = 0;
  2. int rafBufferSize = inputRaf.getBufferSize();
  3. inputRaf.setBufferSize(indexRafBufferSize);

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

  1. int count = 0;
  2. int rafBufferSize = inputRaf.getBufferSize();
  3. inputRaf.setBufferSize( Grib2WriteIndex.indexRafBufferSize );

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

  1. int count = 0;
  2. int rafBufferSize = inputRaf.getBufferSize();
  3. inputRaf.setBufferSize(indexRafBufferSize);

相关文章