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

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

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

@Override
public boolean isValidFile(RandomAccessFile raf) throws IOException {
 if (raf instanceof HTTPRandomAccessFile) { // only do remote if memory resident
  if (raf.length() > raf.getBufferSize())
   return false;
 } else {                                  // wont accept remote index
  GribCdmIndex.GribCollectionType type = GribCdmIndex.getType(raf);
  if (type == GribCdmIndex.GribCollectionType.GRIB1) return true;
  if (type == GribCdmIndex.GribCollectionType.Partition1) return true;
 }
 // check for GRIB1 data file
 return Grib1RecordScanner.isValidFile(raf);
}

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

@Override
public boolean isValidFile(RandomAccessFile raf) throws IOException {
 if (raf instanceof HTTPRandomAccessFile) { // only do remote if memory resident
  if (raf.length() > raf.getBufferSize())
   return false;
 } else {                                  // wont accept remote index
  GribCdmIndex.GribCollectionType type = GribCdmIndex.getType(raf);
  if (type == GribCdmIndex.GribCollectionType.GRIB2) return true;
  if (type == GribCdmIndex.GribCollectionType.Partition2) return true;
 }
 // check for GRIB2 data file
 return Grib2RecordScanner.isValidFile(raf);
}

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

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

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

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

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

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

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

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

相关文章