Ejemplo n.º 1
0
 public BDFFileReader(Stream str)
 {
     if (!str.CanRead) throw new BDFException("BDFFileStream must be able to read from Stream.");
     reader = new BinaryReader(str, Encoding.ASCII);
     header = new BDFHeader();
     header.read(reader); //Read in header
     record = new BDFRecord(header); //Now can create BDFRecord
     _isValid = true;
 }
Ejemplo n.º 2
0
 public BDFFileWriter(Stream str, int nChan, int recordDuration, int samplingRate)
 {
     if (!str.CanWrite) throw new BDFException("BDFFileStream must be able to write to Stream.");
     header = new BDFHeader(nChan, recordDuration, samplingRate);
     record = new BDFRecord(header);
     writer = new BinaryWriter(str);
 }