protected void ReadFileHeader( BinaryReader reader )
{
short headerID = 0;
// read the header ID
headerID = ReadShort( reader );
// better hope this is the header
if ( headerID == (short)MeshChunkID.Header )
{
string fileVersion = ReadString( reader );
// read the version string
if ( version != fileVersion )
{
throw new AxiomException( "Invalid file: version incompatible, file reports {0}, Serializer is version {1}", fileVersion, version );
}
}
else
{
throw new AxiomException( "Invalid file: no header found." );
}
}