Class ParsingTextReader
An extended System.IO.TextReader for use in parsing.
Inheritance
Implements
Inherited Members
Namespace: VDS.RDF.Parsing
Assembly: dotNetRdf.dll
Syntax
public abstract class ParsingTextReader : TextReader, IDisposable
Properties
| Improve this Doc View SourceEndOfStream
Gets whether the end of the stream has been reached.
Declaration
public abstract bool EndOfStream { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
| Improve this Doc View SourceCreate(Stream, int)
Creates a new Blocking Text Reader.
Declaration
public static ParsingTextReader Create(Stream input, int bufferSize)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | input | Input Stream. |
int | bufferSize | Buffer Size. |
Returns
Type | Description |
---|---|
ParsingTextReader |
Create(Stream)
Creates a new Blocking Text Reader.
Declaration
public static ParsingTextReader Create(Stream input)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | input | Input Stream. |
Returns
Type | Description |
---|---|
ParsingTextReader |
Remarks
Blocking IO refers to how the parsing sub-system reads in inputs, it will use Blocking/Non-Blocking IO depending on the input source. In most cases the detection of which to use should never cause an issue but theoretically in some rare cases using non-blocking IO may lead to incorrect parsing errors being thrown (premature end of input detected), if you suspect this is the case try enabling this setting. If you still experience this problem with this setting enabled then there is some other issue with your input.
Create(TextReader, int)
Creates a new Parsing Text Reader.
Declaration
public static ParsingTextReader Create(TextReader input, int bufferSize)
Parameters
Type | Name | Description |
---|---|---|
System.IO.TextReader | input | Text Reader to wrap. |
int | bufferSize | Buffer Size. |
Returns
Type | Description |
---|---|
ParsingTextReader |
Remarks
If the given System.IO.TextReader is already a ParsingTextReader instance, a NonBlockingTextReader or a BlockingTextReader this is a no-op. If the given System.IO.TextReader uses a System.IO.FileStream or System.IO.MemoryStream as its underlying stream source, then this method will create and return a NonBlockingTextReader, otherwise the method will create a BlockingTextReader.
Create(TextReader)
Creates a new Blocking Text Reader.
Declaration
public static ParsingTextReader Create(TextReader input)
Parameters
Type | Name | Description |
---|---|---|
System.IO.TextReader | input | Text Reader to wrap. |
Returns
Type | Description |
---|---|
ParsingTextReader |
CreateBlocking(TextReader, int)
Creates a new Blocking Text Reader.
Declaration
public static BlockingTextReader CreateBlocking(TextReader input, int bufferSize)
Parameters
Type | Name | Description |
---|---|---|
System.IO.TextReader | input | Input reader. |
int | bufferSize | Buffer Size. |
Returns
Type | Description |
---|---|
BlockingTextReader |
CreateBlocking(TextReader)
Creates a new Blocking Text Reader.
Declaration
public static BlockingTextReader CreateBlocking(TextReader input)
Parameters
Type | Name | Description |
---|---|---|
System.IO.TextReader | input | Input reader. |
Returns
Type | Description |
---|---|
BlockingTextReader |
CreateNonBlocking(TextReader, int)
Creates a new non-blocking Text Reader.
Declaration
public static NonBlockingTextReader CreateNonBlocking(TextReader input, int bufferSize)
Parameters
Type | Name | Description |
---|---|---|
System.IO.TextReader | input | Input reader. |
int | bufferSize | Buffer Size. |
Returns
Type | Description |
---|---|
NonBlockingTextReader |
CreateNonBlocking(TextReader)
Creates a new non-blocking Text Reader.
Declaration
public static NonBlockingTextReader CreateNonBlocking(TextReader input)
Parameters
Type | Name | Description |
---|---|---|
System.IO.TextReader | input | Input reader. |
Returns
Type | Description |
---|---|
NonBlockingTextReader |