cdm/src/main/java/ucar/unidata/io/RandomAccessFile.java
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);
  }
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);
  }
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.