/// <summary>Create a header by reading the information from the input stream.</summary> /// <param name="dis">The input stream to read the data from.</param> /// <returns> <CODE>null</CODE> if there was a problem with the header; /// otherwise return the header read from the input stream.</returns> public static Header ReadHeader(ArrayDataIO dis) { Header myHeader = new Header(); try { myHeader.Read(dis); } catch(EndOfStreamException) { // An EOF exception is thrown only if the EOF was detected // when reading the first card. In this case we want // to return a null. return null; } return myHeader; }