public void SetUp()
 {
     using( FileStream stream = new FileStream( "BD01CATD.DDF", FileMode.Open ) )
     {
         using( var reader = new BinaryReader( stream ) )
         {
             _leader = DataDescriptiveRecordLeader.FromStream( reader );
         }
         stream.Close();
     }
 }
        public static DataDescriptiveRecordLeader FromStream( BinaryReader reader )
        {
            char[] leaderData = reader.ReadChars( 24 );

            var leader = new DataDescriptiveRecordLeader();

            leader.RecordLength = int.Parse( new string( leaderData, 0, 5 ) );
            leader.InterchangeLevel = leaderData[ 5 ];
            leader.LeaderType = TypeFromChar(leaderData[ 6 ]);
            leader.InlineCodeExtenstionIndicator = leaderData[ 7 ];
            leader.VersionNumber = leaderData[ 8 ];
            leader.AppIndicator = leaderData[ 9 ];
            leader.FieldControlLength = int.Parse( new string( leaderData, 10, 2 ) );
            LoadFieldArea( leaderData, leader );

            return leader;
        }