static boolean saveDat(TreeMap<String, Character> map)
    {
        try
        {
            DataOutputStream out = new DataOutputStream(new BufferedOutputStream(IOUtil.newOutputStream(path + Predefine.VALUE_EXT)));
            out.writeInt(map.size());
            for (Character character : map.values())
            {
                out.writeChar(character);
            }
            out.close();
        }
        catch (Exception e)
        {
            logger.warning("保存值" + path + Predefine.VALUE_EXT + "失败" + e);
            return false;
        }
        return trie.save(path + Predefine.TRIE_EXT);
    }
static boolean saveDat ( TreeMap < String , Character > map ) { try { DataOutputStream out = new DataOutputStream ( new BufferedOutputStream ( IOUtil . newOutputStream ( path + Predefine . VALUE_EXT ) ) ) ; out . writeInt ( map . size ( ) ) ; for ( Character character : map . values ( ) ) { out . writeChar ( character ) ; } out . close ( ) ; } catch ( Exception e ) { logger . warning ( "保存值" + path + Predefine . VALUE_EXT + "失败" + e ) ; return false ; } return trie . save ( path + Predefine . TRIE_EXT ) ; }
保存dat到磁盘
@param map
@return