ms.setRef(s.substring(0, nIndex1));
ms.setName(s.substring(0, nIndex1));
    private void loadMechData()    {        Vector vMechs = new Vector();        Set sKnownFiles = new HashSet();        long lLastCheck = 0;        long lStart = System.currentTimeMillis();                // check the cache        try {            if (CACHE.exists() && CACHE.lastModified() >= megamek.MegaMek.TIMESTAMP) {                System.out.println("Reading from mechcache file");                lLastCheck = CACHE.lastModified();                BufferedReader br = new BufferedReader(new FileReader(CACHE));                String s;                while ((s = br.readLine()) != null) {                    MechSummary ms = new MechSummary();                    // manually do a string tokenizer.  Much faster                    int nIndex1 = s.indexOf(SEPARATOR);                    ms.setRef(s.substring(0, nIndex1));                    int nIndex2 = s.indexOf(SEPARATOR, nIndex1 + 1);                    ms.setName(s.substring(nIndex1 + 1, nIndex2));                    nIndex1 = nIndex2;                    nIndex2 = s.indexOf(SEPARATOR, nIndex1 + 1);                    ms.setSourceFile(new File(s.substring(nIndex1 + 1, nIndex2)));                    nIndex1 = nIndex2;                    nIndex2 = s.indexOf(SEPARATOR, nIndex1 + 1);                    ms.setEntryName(s.substring(nIndex1 + 1, nIndex2));                    // have to translate "null" to null                    if (ms.getEntryName().equals("null")) {                        ms.setEntryName(null);                    }                    nIndex1 = nIndex2;                    nIndex2 = s.indexOf(SEPARATOR, nIndex1 + 1);                    ms.setYear(Integer.parseInt(s.substring(nIndex1 + 1, nIndex2)));                    nIndex1 = nIndex2;                    nIndex2 = s.indexOf(SEPARATOR, nIndex1 + 1);                    ms.setType(Integer.parseInt(s.substring(nIndex1 + 1, nIndex2)));                    nIndex1 = nIndex2;                    nIndex2 = s.indexOf(SEPARATOR, nIndex1 + 1);                    ms.setTons(Integer.parseInt(s.substring(nIndex1 + 1, nIndex2)));                    ms.setBV(Integer.parseInt(s.substring(nIndex2 + 1)));                                        // verify that this file still exists                    if (ms.getSourceFile().exists()) {                        vMechs.addElement(ms);                        sKnownFiles.add(ms.getSourceFile().toString());                    }                }            }        }        catch (Exception e) {            System.out.println("Unable to load mechcache: " + e.getMessage());            e.printStackTrace();        }                        // load any changes since the last check time        boolean bNeedsUpdate = loadMechsFromDirectory(vMechs, sKnownFiles, lLastCheck, ROOT);                // convert to array        m_data = new MechSummary[vMechs.size()];        vMechs.copyInto(m_data);                // store map references        for (int x = 0; x < m_data.length; x++) {            m_refMap.put(m_data[x].getRef(), m_data[x]);        }                // save updated cache back to disk        if (bNeedsUpdate) {            try {                saveCache(lStart);            } catch (Exception e) {                System.out.println("Unable to save mech cache");            }        }                System.out.println(m_data.length + " mechs loaded.");    }