亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? ftpclientconfigfunctionaltest.java

?? apache推出的net包
?? JAVA
字號:
/* * Copyright 2005 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * *     http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */package org.apache.commons.net.ftp;import junit.framework.TestCase;import java.io.IOException;import java.net.SocketException;import java.text.SimpleDateFormat;import java.util.Calendar;import java.util.Comparator;import java.util.Iterator;import java.util.TreeSet;/* * This test was contributed in a different form by W. McDonald Buck * of Boulder, Colorado, to help fix some bugs with the FTPClientConfig * in a real world setting.  It is a perfect functional test for the * Time Zone functionality of FTPClientConfig. *  * A publicly accessible FTP server at the US National Oceanographic and * Atmospheric Adminstration houses a directory which contains  * 300 files, named sn.0000 to sn.0300. Every ten minutes or so  * the next file in sequence is rewritten with new data. Thus the directory  * contains observations for more than 24 hours of data.  Since the server * has its clock set to GMT this is an excellent functional test for any * machine in a different time zone.  *  * Noteworthy is the fact that the ftp routines in some web browsers don't  * work as well as this.  They can't, since they have no way of knowing the  * server's time zone.  Depending on the local machine's position relative  * to GMT and the time of day, the browsers may decide that a timestamp  * would be in the  future if given the current year, so they assume the  * year to be  last year.  This illustrates the value of FTPClientConfig's  * time zone functionality. */public class FTPClientConfigFunctionalTest extends TestCase {    private FTPClient FTP = new FTPClient();     private FTPClientConfig FTPConf;     /**     *      */    public FTPClientConfigFunctionalTest() {        super();	}    /*      * @throws java.lang.Exception     */    protected void setUp() throws Exception {        super.setUp();	    FTPConf = new FTPClientConfig(FTPClientConfig.SYST_UNIX);	    FTPConf.setServerTimeZoneId("GMT"); 	    FTP.configure(FTPConf);         try {            FTP.connect("tgftp.nws.noaa.gov");            FTP.login("anonymous","testing@apache.org");            FTP.changeWorkingDirectory("SL.us008001/DF.an/DC.sflnd/DS.metar");            FTP.enterLocalPassiveMode();        } catch (SocketException e) {            e.printStackTrace();        } catch (IOException e) {            e.printStackTrace();        }    }    /*      * @throws java.lang.Exception     */    protected void tearDown() throws Exception {        FTP.disconnect();        super.tearDown();    }    /**     * @param arg0     */    public FTPClientConfigFunctionalTest(String arg0) {        super(arg0);    }	    private TreeSet getSortedList(FTPFile[] files) {        // create a TreeSet which will sort each element        // as it is added.        TreeSet sorted = new TreeSet(new Comparator() {            public int compare(Object o1, Object o2) {                FTPFile f1 = (FTPFile) o1;                FTPFile f2 = (FTPFile) o2;                return f1.getTimestamp().getTime().compareTo(f2.getTimestamp().getTime());            }                    });                         for (int i=0; i < files.length; i++) {			// The directory contains a few additional files at the beginning			// which aren't in the series we want. The series we want consists			// of files named sn.dddd. This adjusts the file list to get rid 			// of the uninteresting ones.             if (files[i].getName().startsWith("sn")) {                sorted.add(files[i]);            }            }        return sorted;    }	    public static void main(String[] args) {        FTPClientConfigFunctionalTest F = new FTPClientConfigFunctionalTest();    }        public void testTimeZoneFunctionality() throws Exception {        java.util.Date now = new java.util.Date();        FTPFile[] files = FTP.listFiles();        TreeSet sorted = getSortedList(files);        //SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy HH:mm z" );        FTPFile lastfile = null;        FTPFile firstfile = null;        for (Iterator it = sorted.iterator(); it.hasNext();) {            FTPFile thisfile = (FTPFile) it.next();            if (firstfile == null) {                firstfile = thisfile;            }            //System.out.println(sdf.format(thisfile.getTimestamp().getTime())             //        + " " +thisfile.getName());            if (lastfile != null) {                // verify that the list is sorted earliest to latest.                assertTrue(lastfile.getTimestamp()                        .before(thisfile.getTimestamp()));            }            lastfile = thisfile;        }                // test that notwithstanding any time zone differences, the newest file        // is older than now.        assertTrue(lastfile.getTimestamp().getTime().before(now));        Calendar first = firstfile.getTimestamp();        // test that the oldest is less than two days older than the newest         // and, in particular, that no files have been considered "future"         // by the parser and therefore been relegated to the same date a         // year ago.        first.add(Calendar.DATE, 2);        assertTrue(lastfile.getTimestamp().before(first));    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲老司机在线| 亚洲精品中文在线影院| 精品视频一区二区不卡| 91浏览器入口在线观看| 国产成人精品在线看| 国产剧情一区二区三区| 韩国欧美国产一区| 精品一区二区三区在线观看| 喷水一区二区三区| 韩国女主播一区| 国产福利视频一区二区三区| 成人听书哪个软件好| 成人av电影在线| 91视频观看视频| 欧美日韩五月天| 欧美高清精品3d| 2019国产精品| 国产精品免费人成网站| 亚洲欧美视频在线观看| 亚洲一区二区免费视频| 日产国产欧美视频一区精品| 狠狠色狠狠色综合系列| 国产成人一区在线| 色综合天天性综合| 555www色欧美视频| 日本一区二区视频在线| 亚洲激情一二三区| 免费观看久久久4p| 成人小视频免费观看| 欧美自拍丝袜亚洲| 欧美不卡一区二区三区四区| 欧美高清在线一区二区| 亚洲v日本v欧美v久久精品| 蜜桃视频免费观看一区| 成人黄色软件下载| 日韩视频一区二区| 亚洲人成影院在线观看| 日韩福利视频导航| av资源网一区| 精品国一区二区三区| 成人欧美一区二区三区1314| 视频一区二区不卡| 99久久国产综合精品色伊| 日韩一级免费观看| 亚洲欧美福利一区二区| 国产一区二区福利视频| 欧美色国产精品| 国产免费成人在线视频| 美日韩一区二区三区| 99久久国产综合色|国产精品| 91精品一区二区三区久久久久久 | 欧美日韩精品二区第二页| 日韩精品一区在线| 亚洲午夜久久久久久久久电影网| 国内精品国产成人国产三级粉色 | 欧美高清视频www夜色资源网| 日本一区二区高清| 国内精品在线播放| 欧美一级日韩免费不卡| 一级特黄大欧美久久久| 成人午夜免费电影| 久久久99精品久久| 激情五月婷婷综合网| 欧美浪妇xxxx高跟鞋交| 亚洲免费观看高清完整版在线观看| 国产精品中文欧美| 337p粉嫩大胆色噜噜噜噜亚洲| 婷婷夜色潮精品综合在线| 色婷婷av一区二区三区软件| 亚洲特级片在线| 国产91精品免费| 国产视频一区二区在线| 国产精品2024| 国产欧美日韩一区二区三区在线观看 | 蜜臀va亚洲va欧美va天堂| 欧美日韩成人激情| 日韩福利视频网| 日韩三级视频在线观看| 日本欧美一区二区三区| 欧美一区二区三区系列电影| 无码av中文一区二区三区桃花岛| 91福利在线免费观看| 尤物在线观看一区| 欧美亚洲国产一区二区三区va | 亚洲国产综合色| 欧美性感一类影片在线播放| 亚洲福利电影网| 欧美一级欧美三级在线观看| 日本成人在线电影网| 欧美va亚洲va在线观看蝴蝶网| 美女视频黄a大片欧美| 精品卡一卡二卡三卡四在线| 国模一区二区三区白浆| 国产精品私人自拍| 91免费国产在线观看| 亚洲大片精品永久免费| 日韩女优毛片在线| 成人性色生活片| 亚洲综合一区二区精品导航| 欧美一二三四区在线| 国产精品一区二区在线播放| 国产精品视频yy9299一区| 日本伦理一区二区| 日韩高清在线电影| 国产欧美一区二区精品久导航| 色婷婷激情一区二区三区| 日韩中文字幕1| 国产欧美日韩久久| 欧美日韩国产在线播放网站| 久久99蜜桃精品| 亚洲人吸女人奶水| 日韩欧美国产一二三区| 97久久超碰国产精品电影| 午夜日韩在线观看| 国产精品色在线| 欧美日本在线一区| 99久久精品国产毛片| 免费成人av资源网| 亚洲欧美日韩在线| 国产日韩一级二级三级| 在线不卡中文字幕播放| 成人av资源在线观看| 青青草精品视频| 亚洲欧美经典视频| 欧美激情一区三区| 日韩精品一区二区三区在线播放 | 91精品国产乱码| 91免费小视频| 国产成人日日夜夜| 麻豆91在线看| 五月开心婷婷久久| 一区二区三区在线视频观看58| 亚洲精品在线电影| 欧美日本在线视频| 91色婷婷久久久久合中文| 国产成人免费9x9x人网站视频| 日本亚洲视频在线| 午夜视黄欧洲亚洲| 一区二区视频在线| 亚洲视频小说图片| 欧美国产一区在线| 国产日韩欧美高清| 久久九九久久九九| 久久亚洲精精品中文字幕早川悠里| 欧美精品久久99久久在免费线| 色综合久久综合中文综合网| 成人一级黄色片| 福利电影一区二区| 丁香一区二区三区| 丁香激情综合国产| 国产99久久久国产精品潘金| 国产美女在线观看一区| 美女精品自拍一二三四| 老司机免费视频一区二区三区| 亚洲大片一区二区三区| 亚洲va国产天堂va久久en| 亚洲电影激情视频网站| 视频一区中文字幕国产| 天堂精品中文字幕在线| 天天综合网 天天综合色| 日韩av中文字幕一区二区| 日韩av一区二| 九九国产精品视频| 国产iv一区二区三区| 91在线精品一区二区| 在线一区二区三区| 欧美色精品天天在线观看视频| 欧美久久高跟鞋激| 欧美tk—视频vk| 久久久久国产一区二区三区四区| 国产夜色精品一区二区av| 国产欧美一区二区三区网站| 中文字幕一区在线| 一区二区三区 在线观看视频| 亚洲高清一区二区三区| 日本不卡视频一二三区| 国产精品99久久久久久似苏梦涵| 国产精品996| 在线观看不卡一区| 欧美成人aa大片| 中文字幕亚洲精品在线观看 | 日韩一区二区免费电影| 国产拍欧美日韩视频二区| 一区二区三区四区在线| 奇米色一区二区| 国产精一品亚洲二区在线视频| 91在线观看地址| 91精品国产麻豆国产自产在线 | 欧美日韩国产成人在线91 | 国产盗摄一区二区| 欧美在线一二三四区| 精品日韩成人av| 亚洲三级在线免费| 精品一区二区成人精品| 97久久精品人人做人人爽50路| 欧美高清视频一二三区| 中文字幕在线不卡视频| 免费看精品久久片| 在线欧美小视频| 久久精品视频网|