| Constructors: NewStreamReader |
Creates a new StreamReader from either a FileName or an existing stream to read from.
Public Function NewStreamReader( ByVal Source As Variant, Optional ByVal Encoding As Encoding, Optional ByVal determineEncodingFromByteOrderMarks As Boolean = True, Optional ByVal BufferSize As Long = 4096 ) As StreamReader
Default: True
Default: 4096
If a filename is specified, then an internal FileStream object is created using an initialization of Cor.NewFileStream(Source, FileMode.OpenExisting, FileAccess.ReadAccess, FileShare.ReadShare).
If determineEncodingFromByteOrderMarks is True, then up to 3 bytes are read from the stream
upon the first attempt to read any data from the stream. The bytes are used to determine if a specific
encoding has been used. There are 3 encoding signatures that are looked for.
&HFE, &HFF - UnicodeEncoding with Little Endian byte ordering
&HFF, &HFE - UnicodeEncoding with Big Endian byte ordering
&HEF, &HBB, &HBF - UTF8Encoding
If no encoding is identified, then Encoding.UTF8 is used.
Project VBCorLib Overview Class Constructors Overview Constructors Properties Constructors Methods NewStack NewStreamWriter