void map(ByteBuffer buffer) {
    if (!(reader instanceof MappedJournalSegmentReader)) {
      JournalReader<E> reader = this.reader;
      this.reader = new MappedJournalSegmentReader<>(buffer, segment, maxEntrySize, index, namespace);
      this.reader.reset(reader.getNextIndex());
      reader.close();
    }
  }
void map ( ByteBuffer buffer ) { if ( ! ( reader instanceof MappedJournalSegmentReader ) ) { JournalReader < E > reader = this . reader ; this . reader = new MappedJournalSegmentReader < > ( buffer , segment , maxEntrySize , index , namespace ) ; this . reader . reset ( reader . getNextIndex ( ) ) ; reader . close ( ) ; } }
Converts the reader to a mapped reader using the given buffer.

@param buffer the mapped buffer