Skip to content

JournalBufferReader.Peek(int, Span<byte>)

Peek(int, Span<byte>)

View source
public ReadOnlySpan<byte> Peek(int count, Span<byte> destination)
Gets a span containing the next count bytes without reading them.

Parameters

countint
The number of bytes to read.
destinationSpan<byte>
Temporary storage used if the requested bytes are not contiguous.

Returns

A span containing the requested bytes. The returned span must not be retained after the consumer returns.