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

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

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

RandomAccessFile.readBuffer介绍

暂无

代码示例

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

/**
 * Set the position in the file for the next read or write.
 *
 * @param pos the offset (in bytes) from the start of the file.
 * @throws IOException if an I/O error occurrs.
 */
public void seek(long pos) throws IOException {
 // If the seek is into the buffer, just update the file pointer.
 if ((pos >= bufferStart) && (pos < dataEnd)) {
  filePosition = pos;
  return;
 }
 // need new buffer, starting at pos
 readBuffer(pos);
}

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

/**
 * Set the position in the file for the next read or write.
 *
 * @param pos the offset (in bytes) from the start of the file.
 * @throws IOException if an I/O error occurrs.
 */
public void seek(long pos) throws IOException {
 if (pos < 0)
  throw new java.io.IOException("Negative seek offset");
 // If the seek is into the buffer, just update the file pointer.
 if ((pos >= bufferStart) && (pos < dataEnd)) {
  filePosition = pos;
  return;
 }
 // need new buffer, starting at pos
 readBuffer(pos);
}

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

/**
 * Set the position in the file for the next read or write.
 *
 * @param pos the offset (in bytes) from the start of the file.
 * @throws IOException if an I/O error occurrs.
 */
public void seek(long pos) throws IOException {
 if (pos < 0)
  throw new java.io.IOException("Negative seek offset");
 // If the seek is into the buffer, just update the file pointer.
 if ((pos >= bufferStart) && (pos < dataEnd)) {
  filePosition = pos;
  return;
 }
 // need new buffer, starting at pos
 readBuffer(pos);
}

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

/**
 * Set the position in the file for the next read or write.
 *
 * @param pos the offset (in bytes) from the start of the file.
 * @throws IOException if an I/O error occurrs.
 */
public void seek(long pos) throws IOException {
 if (pos < 0)
  throw new java.io.IOException("Negative seek offset");
 // If the seek is into the buffer, just update the file pointer.
 if ((pos >= bufferStart) && (pos < dataEnd)) {
  filePosition = pos;
  return;
 }
 // need new buffer, starting at pos
 readBuffer(pos);
}

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

readBuffer(dataEnd - matchLen); // force new buffer

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

readBuffer(dataEnd - matchLen); // force new buffer

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

readBuffer(dataEnd - matchLen); // force new buffer

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

readBuffer(dataEnd - matchLen); // force new buffer

相关文章