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

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

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

  1. /**
  2. * Set the position in the file for the next read or write.
  3. *
  4. * @param pos the offset (in bytes) from the start of the file.
  5. * @throws IOException if an I/O error occurrs.
  6. */
  7. public void seek(long pos) throws IOException {
  8. // If the seek is into the buffer, just update the file pointer.
  9. if ((pos >= bufferStart) && (pos < dataEnd)) {
  10. filePosition = pos;
  11. return;
  12. }
  13. // need new buffer, starting at pos
  14. readBuffer(pos);
  15. }

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

  1. /**
  2. * Set the position in the file for the next read or write.
  3. *
  4. * @param pos the offset (in bytes) from the start of the file.
  5. * @throws IOException if an I/O error occurrs.
  6. */
  7. public void seek(long pos) throws IOException {
  8. if (pos < 0)
  9. throw new java.io.IOException("Negative seek offset");
  10. // If the seek is into the buffer, just update the file pointer.
  11. if ((pos >= bufferStart) && (pos < dataEnd)) {
  12. filePosition = pos;
  13. return;
  14. }
  15. // need new buffer, starting at pos
  16. readBuffer(pos);
  17. }

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

  1. /**
  2. * Set the position in the file for the next read or write.
  3. *
  4. * @param pos the offset (in bytes) from the start of the file.
  5. * @throws IOException if an I/O error occurrs.
  6. */
  7. public void seek(long pos) throws IOException {
  8. if (pos < 0)
  9. throw new java.io.IOException("Negative seek offset");
  10. // If the seek is into the buffer, just update the file pointer.
  11. if ((pos >= bufferStart) && (pos < dataEnd)) {
  12. filePosition = pos;
  13. return;
  14. }
  15. // need new buffer, starting at pos
  16. readBuffer(pos);
  17. }

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

  1. /**
  2. * Set the position in the file for the next read or write.
  3. *
  4. * @param pos the offset (in bytes) from the start of the file.
  5. * @throws IOException if an I/O error occurrs.
  6. */
  7. public void seek(long pos) throws IOException {
  8. if (pos < 0)
  9. throw new java.io.IOException("Negative seek offset");
  10. // If the seek is into the buffer, just update the file pointer.
  11. if ((pos >= bufferStart) && (pos < dataEnd)) {
  12. filePosition = pos;
  13. return;
  14. }
  15. // need new buffer, starting at pos
  16. readBuffer(pos);
  17. }

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

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

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

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

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

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

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

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

相关文章