code: public byte[] read(long record) throws IOException {
          // (+ recordSize) allows skipping metadata record
          long pos = record * recordSize + recordSize;
          if (pos >= size) {
              final String fmt = "bad seek to position: %d (size is %d)";
              final String msg = format(fmt, pos, size);
              throw new InvalidArgument(msg);
          }
  
          raf.seek(pos);
          byte[] ret = new byte[recordSize];
          int read = raf.read(ret);
  
          if (read != recordSize) {
              final String fmt = "read %d bytes, but expected %d";
              final String msg = format(fmt, read, recordSize);
              throw new InvalidArgument(msg);
          }
          return ret;
      }
docs: Reads a record from this record file.
  
  @param record The record to read
  @return {@code byte[]}
  @throws IOException Throw if an I/O error occurs during I/O seeks or
  reads