Table of Contents

Class StreamReader

Namespace
CMS.IO
Assembly
CMS.IO.dll

Represents a reader that can read a sequential series of characters.

public class StreamReader : TextReader
Inheritance
object
MarshalByRefObject
TextReader
StreamReader
Extension Methods

Properties

EndOfStream

Gets a value that indicates whether the current stream position is at the end of the stream.

public bool EndOfStream { get; }

Property Value

bool

Methods

Dispose(bool)

Releases all resources.

protected override void Dispose(bool disposing)

Parameters

disposing bool

Disposing

New(Stream)

Returns new instance of stream reader class.

public static StreamReader New(Stream stream)

Parameters

stream Stream

System.IO.Stream object

Returns

StreamReader

New(Stream, Encoding)

Returns new instance of stream reader class.

public static StreamReader New(Stream stream, Encoding encoding)

Parameters

stream Stream

System.IO.Stream object

encoding Encoding

Encoding

Returns

StreamReader

New(StreamReader)

Returns new instance of stream reader class.

public static StreamReader New(StreamReader sr)

Parameters

sr StreamReader

System stream reader object

Returns

StreamReader

New(string)

Returns new instance of stream reader class.

public static StreamReader New(string path)

Parameters

path string

Path

Returns

StreamReader

Peek()

Returns the next available character but does not consume it.

public override int Peek()

Returns

int

Read()

Reads the next character from the input stream and advances the character position by one character.

public override int Read()

Returns

int

ReadLine()

Reads a line from the underlying string.

public override string ReadLine()

Returns

string

ReadToEnd()

Reads the stream from the current position to the end of the stream.

public override string ReadToEnd()

Returns

string