Class FileToStringSampleStream
Provides the ability to read the contents of files contained in an object stream of files.
public class FileToStringSampleStream : FilterObjectStream<FileInfo?, string?>, IObjectStream<string?>, IDisposable
- Inheritance
-
FileToStringSampleStream
- Implements
- Inherited Members
Constructors
FileToStringSampleStream(IObjectStream<FileInfo?>, Encoding)
Provides the ability to read the contents of files contained in an object stream of files.
public FileToStringSampleStream(IObjectStream<FileInfo?> samples, Encoding encoding)
Parameters
samplesIObjectStream<FileInfo>encodingEncoding
Methods
Read()
Returns the next object. Calling this method repeatedly until it returns
null will return each object from the underlying source exactly once.
public override string? Read()
Returns
- string
the next object or
nullto signal that the stream is exhausted
Exceptions
- IOException
if there is an error during reading
- IOException
if there is an error during reading