private void WriteHeader() { int hSize = _Header.GetHeaderSizeInBytes(); byte[] hBytes = _Header.ToByteArray(); _StreamWriter.Write(hBytes, 0, hSize); }
public PCXRReaderIO(string fullName, PCXRHeader header) { if (File.Exists(fullName)) { _FilePath = fullName; _NumberOfPointsToBuffer = header.NumberOfPoints; _Header = header; _BytesToReadIntoPointsBuffer = (int)(_Header.Stride * sizeof(float) * _NumberOfPointsToBuffer); _ReadBuffer = new byte[_BytesToReadIntoPointsBuffer + _Header.GetHeaderSizeInBytes()]; ReadFile(); } else { throw new FileNotFoundException(fullName + " not found"); } }