static void DumpFileToXml(ClassPath jar, string file) { using (var s = File.OpenRead(file)) { if (ClassFile.IsClassFile(s)) { s.Position = 0; var c = new ClassFile(s); jar.Add(c); return; } } if (ClassPath.IsJarFile(file)) { jar.Load(file); return; } Console.Error.WriteLine("class-parse: Unable to read file '{0}': Unknown file format."); Environment.ExitCode = 1; }