code: public byte[] getRecord(final long iPosition) throws IOException {
      if (iPosition == -1)
        return null;
  
      acquireSharedLock();
      try {
  
        final long[] pos = getRelativePosition(iPosition);
        final OFile file = files[(int) pos[0]];
  
        final int recordSize = file.readInt(pos[1]);
        if (recordSize <= 0)
          // RECORD DELETED
          return null;
  
        if (pos[1] + RECORD_FIX_SIZE + recordSize > file.getFilledUpTo())
          throw new OStorageException(
              "Error on reading record from file '"
                  + file.getName()
                  + "', position "
                  + iPosition
                  + ", size "
                  + OFileUtils.getSizeAsString(recordSize)
                  + ": the record size is bigger then the file itself ("
                  + OFileUtils.getSizeAsString(getFilledUpTo())
                  + "). Probably the record is dirty due to a previous crash. It is strongly suggested to restore the database or export and reimport this one.");
  
        final byte[] content = new byte[recordSize];
        file.read(pos[1] + RECORD_FIX_SIZE, content, recordSize);
        return content;
  
      } finally {
        releaseSharedLock();
      }
    }
docs: Returns the record content from file.
  
  @throws IOException