コード例 #1
0
ファイル: BDFFileStream.cs プロジェクト: DOPS-CCI/CCI_project
 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;
 }
コード例 #2
0
ファイル: BDFFileStream.cs プロジェクト: DOPS-CCI/CCI_project
 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);
 }