@Override
    public void downloadAllFiles() {
        Map<String, WikiResourceMeta> newFileMetaList = new HashMap<String, WikiResourceMeta>(alreadyDownloadMeta);

        try {
            Map<String, WikiResourceMeta> fileMetaList = getPageUrls();

            for (Map.Entry<String, WikiResourceMeta> fileMeta : fileMetaList.entrySet()) {
                WikiResourceMeta meta = fileMeta.getValue();

                HttpGet httpget = new HttpGet(WikiConf.HOST_PREFIX + meta.getNormalizeUrl());
                httpget.setHeader("Cookie", WikiConf.Cookie);

                HttpClient httpclient = new DefaultHttpClient();
                HttpResponse response = null;
                try {
                    response = httpclient.execute(httpget);
                }catch(Exception ex){
                    ex.printStackTrace();
                }
                if(response == null){
                    continue;
                }

                HttpEntity entity = response.getEntity();

                String html = EntityUtils.toString(entity);

                // extract page content
                Document doc = Jsoup.parse(html);

                // check timestamp for update
/*
                Element footer = doc.getElementById("footer-info-Array");
                String footerText = footer.text();

                String date = footerText.substring(footerText.indexOf("最后修改于"));

                // check timestamp for update
                if(alreadyDownloadMeta.containsKey(meta.getNormalizeUrl())){

                    WikiResourceMeta oldmeta = newFileMetaList.get(meta.getNormalizeUrl());

                    if(date.equals(oldmeta.getUpdateTime())) {
                        continue;
                    }else{
                        oldmeta.setUpdateTime(meta.getUpdateTime());
                    }
                }
*/
                if(!alreadyDownloadMeta.containsKey(meta.getNormalizeUrl())){
                    newFileMetaList.put(fileMeta.getKey(), fileMeta.getValue());

                    System.out.println("new: " + meta.getNormalizeUrl() + "\t" + meta.getNormalizeFileName());
                }

                // save page content
                Elements contentE = doc.getElementsByClass("mw-body");

                byte[] content = contentE.text().getBytes();

                FileOutputStream fos = null;
                try{
                    fos = new FileOutputStream(outputFolder + makeNormalNameforPage(meta.getNormalizeFileName()));
                    fos.write(content, 0, content.length);
                }catch(Exception ex){
                    ex.printStackTrace();
                }finally{
                    try{
                        if(fos != null) {
                            fos.close();
                        }
                    }catch(Exception ex){
                        ex.printStackTrace();
                    }
                }

            }
        } catch (ParseException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }

        updateAlreadyDownload(outputFolder + "mediawikispider.md", newFileMetaList);
    }