} else if (lowerName.endsWith(".ptf")) { loader = new PtfFile(is);
    public void parse(InputStream is, String fileName) throws EntityLoadingException {        String lowerName = fileName.toLowerCase();        MechLoader loader;        if (lowerName.endsWith(".mep")) {            loader = new MepFile(is);        } else if (lowerName.endsWith(".mtf")) {            loader = new MtfFile(is);        } else if (lowerName.endsWith(".hmp")) {            loader = new HmpFile(is);                   } else if (lowerName.endsWith(".hmv")) {            loader = new HmvFile(is);                   } else if (lowerName.endsWith(".xml")) {            loader = new TdbFile(is);        } else if (lowerName.endsWith(".ptf")) {            loader = new PtfFile(is);        } else if (lowerName.endsWith(".blk")) {            BuildingBlock bb = new BuildingBlock(is);            if (bb.exists("UnitType")) {                String sType = bb.getDataAsString("UnitType")[0];                if (sType.equals("Tank")) {                    loader = new BLKTankFile(bb);                }                else if (sType.equals("Infantry")) {                    loader = new BLKInfantryFile(bb);                }                else if (sType.equals("BattleArmor")) {                    loader = new BLKBattleArmorFile(bb);                }                else if (sType.equals("ProtoMech")) {                    loader = new BLKProtoFile(bb);                }                else if (sType.equals("Mech")) {                    loader = new BLKMechFile(bb);                }                else {                    throw new EntityLoadingException("Unknown UnitType: " + sType);                }            }            else {                loader = new BLKMechFile(bb);            }        } else if (lowerName.endsWith(".dbm")) {            throw new EntityLoadingException("In order to use mechs from The Drawing Board with MegaMek, you must save your mech as an XML file (look in the 'File' menu of TDB.)  Then use the resulting '.xml' file instead of the '.dbm' file.  Note that only version 2.0.23 or later of TDB is compatible with MegaMek.");        } else {            throw new EntityLoadingException("Unsupported file suffix");        }                m_entity = loader.getEntity();                postLoadInit(m_entity);    }