/// <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)
 {
 }
예제 #3
0
 public PrefixedVariableLengthRecordReader(Stream stream, LengthIndicatorType indicatorType, int indicatorLength, Encoding encoding)
 {
     this.stream          = stream;
     this.indicatorType   = indicatorType;
     this.indicatorLength = indicatorLength;
     this.encoding        = encoding;
 }
예제 #4
0
 /// <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)
 {
 }
 /// <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)
 {
 }
예제 #6
0
 /// <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)
 {
 }