Class ParsingTextReader
An extended TextReader for use in parsing.
Implements
Inherited Members
Namespace: VDS.RDF.Parsing
Assembly: dotNetRdf.dll
Syntax
public abstract class ParsingTextReader : TextReader, IDisposable
Properties
| Edit this page View SourceEndOfStream
Gets whether the end of the stream has been reached.
Declaration
public abstract bool EndOfStream { get; }
Property Value
Type | Description |
---|---|
bool |
Methods
| Edit this page View SourceCreate(Stream)
Creates a new Blocking Text Reader.
Declaration
public static ParsingTextReader Create(Stream input)
Parameters
Type | Name | Description |
---|---|---|
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(Stream, int)
Creates a new Blocking Text Reader.
Declaration
public static ParsingTextReader Create(Stream input, int bufferSize)
Parameters
Type | Name | Description |
---|---|---|
Stream | input | Input Stream. |
int | bufferSize | Buffer Size. |
Returns
Type | Description |
---|---|
ParsingTextReader |
Create(TextReader)
Creates a new Blocking Text Reader.
Declaration
public static ParsingTextReader Create(TextReader input)
Parameters
Type | Name | Description |
---|---|---|
TextReader | input | Text Reader to wrap. |
Returns
Type | Description |
---|---|
ParsingTextReader |
Create(TextReader, int)
Creates a new Parsing Text Reader.
Declaration
public static ParsingTextReader Create(TextReader input, int bufferSize)
Parameters
Type | Name | Description |
---|---|---|
TextReader | input | Text Reader to wrap. |
int | bufferSize | Buffer Size. |
Returns
Type | Description |
---|---|
ParsingTextReader |
Remarks
If the given TextReader is already a ParsingTextReader instance, a NonBlockingTextReader or a BlockingTextReader this is a no-op. If the given TextReader uses a FileStream or MemoryStream as its underlying stream source, then this method will create and return a NonBlockingTextReader, otherwise the method will create a BlockingTextReader.
CreateBlocking(TextReader)
Creates a new Blocking Text Reader.
Declaration
public static BlockingTextReader CreateBlocking(TextReader input)
Parameters
Type | Name | Description |
---|---|---|
TextReader | input | Input reader. |
Returns
Type | Description |
---|---|
BlockingTextReader |
CreateBlocking(TextReader, int)
Creates a new Blocking Text Reader.
Declaration
public static BlockingTextReader CreateBlocking(TextReader input, int bufferSize)
Parameters
Type | Name | Description |
---|---|---|
TextReader | input | Input reader. |
int | bufferSize | Buffer Size. |
Returns
Type | Description |
---|---|
BlockingTextReader |
CreateNonBlocking(TextReader)
Creates a new non-blocking Text Reader.
Declaration
public static NonBlockingTextReader CreateNonBlocking(TextReader input)
Parameters
Type | Name | Description |
---|---|---|
TextReader | input | Input reader. |
Returns
Type | Description |
---|---|
NonBlockingTextReader |
CreateNonBlocking(TextReader, int)
Creates a new non-blocking Text Reader.
Declaration
public static NonBlockingTextReader CreateNonBlocking(TextReader input, int bufferSize)
Parameters
Type | Name | Description |
---|---|---|
TextReader | input | Input reader. |
int | bufferSize | Buffer Size. |
Returns
Type | Description |
---|---|
NonBlockingTextReader |