/// <summary>Read in the Data object for this HDU.</summary> /// <param name="stream">the stream from which the data is read.</param> /// <exception cref="FitsException"> FitsException if the Data object could not be created from this HDU's Header</exception> public virtual void ReadData(ArrayDataIO stream) { myData = null; try { myData = ManufactureData(); } finally { // if we cannot build a Data object, skip this section if (myData == null) { try { SkipData(stream, myHeader); } catch(Exception) { } } } myData.Read(stream); }
/// <summary>Read out the HDU from the data stream. This /// will overwrite any existing header and data components. /// </summary> public virtual void Read(ArrayDataIO stream) { myHeader = Header.ReadHeader(stream); myData = myHeader.MakeData(); myData.Read(stream); }