//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: EntryRecordCursor(Reader reader, org.neo4j.causalclustering.messaging.marshalling.ChannelMarshal<org.neo4j.causalclustering.core.replication.ReplicatedContent> contentMarshal, long currentIndex, long wantedIndex, SegmentFile segment) throws java.io.IOException, org.neo4j.causalclustering.messaging.EndOfStreamException internal EntryRecordCursor(Reader reader, ChannelMarshal <ReplicatedContent> contentMarshal, long currentIndex, long wantedIndex, SegmentFile segment) { this._bufferedReader = new ReadAheadChannel <StoreChannel>(reader.Channel()); this._reader = reader; this._contentMarshal = contentMarshal; this._segment = segment; /* The cache lookup might have given us an earlier position, scan forward to the exact position. */ while (currentIndex < wantedIndex) { read(_bufferedReader, contentMarshal); currentIndex++; } this._position = new LogPosition(currentIndex, _bufferedReader.position()); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public boolean next() throws java.io.IOException public override bool Next() { EntryRecord entryRecord; try { entryRecord = read(_bufferedReader, _contentMarshal); } catch (EndOfStreamException) { _currentRecord.invalidate(); return(false); } catch (IOException e) { _hadError = true; throw e; } _currentRecord.set(entryRecord); _position.byteOffset = _bufferedReader.position(); _position.logIndex++; return(true); }