Method GetDecodingReader
GetDecodingReader(Stream, Encoding)
Wrapping the given
Decoding readers are useful to load configuration files, stopword lists or synonym files to detect character set problems. However, its not recommended to use as a common purpose reader.
Declaration
public static TextReader GetDecodingReader(Stream stream, Encoding charSet)
Parameters
Type | Name | Description |
---|---|---|
Stream | stream | The stream to wrap in a reader |
Encoding | charSet | The expected charset |
Returns
Type | Description |
---|---|
TextReader | A wrapping reader |
GetDecodingReader(FileInfo, Encoding)
Opens a
Decoding readers are useful to load configuration files, stopword lists or synonym files to detect character set problems. However, its not recommended to use as a common purpose reader.
Declaration
public static TextReader GetDecodingReader(FileInfo file, Encoding charSet)
Parameters
Type | Name | Description |
---|---|---|
FileInfo | file | The file to open a reader on |
Encoding | charSet | The expected charset |
Returns
Type | Description |
---|---|
TextReader | A reader to read the given file |
GetDecodingReader(Type, String, Encoding)
Opens a
Decoding readers are useful to load configuration files, stopword lists or synonym files to detect character set problems. However, its not recommended to use as a common purpose reader.
Declaration
public static TextReader GetDecodingReader(Type clazz, string resource, Encoding charSet)
Parameters
Type | Name | Description |
---|---|---|
Type | clazz | The class used to locate the resource |
System.String | resource | The resource name to load |
Encoding | charSet | The expected charset |
Returns
Type | Description |
---|---|
TextReader | A reader to read the given file |