/// <summary> /// Read a record with a variable length prefix on them /// and process them record by record /// </summary> /// <param name="stream">Stream reader to process</param> /// <param name="indicatorType">Type of record length indicator</param> /// <param name="indicatorLength">Length of the indicator in bytes</param> /// <param name="encoding">Encoding on the file</param> public PrefixedVariableLengthRecordReader(Stream stream, LengthIndicatorType indicatorType, int indicatorLength, Encoding encoding) { this.stream = stream; this.indicatorType = indicatorType; this.indicatorLength = indicatorLength; this.encoding = encoding; }
/// <summary> /// Read a record with a variable length prefix on them /// and process them record by record /// </summary> /// <param name="fileName">Name of file to read</param> /// <param name="indicatorType">Type of record length indicator</param> /// <param name="indicatorLength">Length of the indicator in bytes</param> /// <param name="encoding">Encoding on the file</param> public PrefixedVariableLengthRecordReader(string fileName, LengthIndicatorType indicatorType, int indicatorLength, Encoding encoding) : this(new FileStream(fileName, FileMode.Open, FileAccess.Read), indicatorType, indicatorLength, encoding) { }
public PrefixedVariableLengthRecordReader(Stream stream, LengthIndicatorType indicatorType, int indicatorLength, Encoding encoding) { this.stream = stream; this.indicatorType = indicatorType; this.indicatorLength = indicatorLength; this.encoding = encoding; }
/// <summary> /// Read a record with a variable length prefix on them /// and process them record by record /// </summary> /// <param name="stream">Stream reader to process</param> /// <param name="indicatorType">Type of record length indicator</param> /// <param name="indicatorLength">Length of the indicator in bytes</param> public PrefixedVariableLengthRecordReader(Stream stream, LengthIndicatorType indicatorType, int indicatorLength) : this(stream, indicatorType, indicatorLength, Encoding.Default) { }