Class NonBlockingTextReader
The NonBlockingTextReader is an implementation of a BufferedTextReader designed to wrap other readers where latency is known not to be a problem and we don't expect to ever have an empty read occur before the actual end of the stream.
Inheritance
Implements
Inherited Members
Namespace: VDS.RDF.Parsing
Assembly: dotNetRdf.dll
Syntax
public sealed class NonBlockingTextReader : BufferedTextReader, IDisposable
Remarks
By default, dotNetRDF parsers will wrap a System.IO.MemoryStream or System.IO.FileStream (or a System.IO.TextReader that uses such a stream) in a NonBlockingTextReader, and all other types of System.IO.Stream or System.IO.TextReader in a BlockingTextReader to handle potential latency issues. In some rare cases you may find that non-blocking IO leads to incorrect parsing errors being thrown (typically a premature end-of-input detected due to latency in reading from the underlying stream. In such cases it is recommended to use CreateBlocking(TextReader) or CreateBlocking(TextReader, int) to force the use of blocking IO.
Methods
| Improve this Doc View SourceFillBuffer()
Fills the buffer in a non-blocking manner.
Declaration
protected override void FillBuffer()
Overrides
Remarks
By default, dotNetRDF parsers will wrap a System.IO.MemoryStream or System.IO.FileStream (or a System.IO.TextReader that uses such a stream) in a NonBlockingTextReader, and all other types of System.IO.Stream or System.IO.TextReader in a BlockingTextReader to handle potential latency issues. In some rare cases you may find that non-blocking IO leads to incorrect parsing errors being thrown (typically a premature end-of-input detected due to latency in reading from the underlying stream. In such cases it is recommended to use CreateBlocking(TextReader) or CreateBlocking(TextReader, int) to force the use of blocking IO.