code: protected void openChannel(boolean readHeader, boolean readIndex) throws FileLockException, IOException {
          super.openChannel(readHeader);
          calcIndexInformations();
          if (mode == AccessMode.READ_ONLY) {
              indexBuffer = channel.map(FileChannel.MapMode.READ_ONLY, INDEX_OFFSET, indexSizeInBytes);
          } else {
              indexBuffer = channel.map(FileChannel.MapMode.READ_WRITE, INDEX_OFFSET, indexSizeInBytes);
          }
  
          if (readIndex) {
              readIndex();
          }
      }
docs: opens the {@link RandomAccessFile} and the corresponding {@link FileChannel}. Optionally reads the header. and
  the index
  
  @param should
  the header be read
  @param should
  the index be read
  @throws IOException