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

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

?? filecleaner.java

?? < JavaME核心技術最佳實踐>>的全部源代碼
?? JAVA
字號:
/*
 * Copyright 2001-2004 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.io;

import java.io.File;
import java.lang.ref.PhantomReference;
import java.lang.ref.ReferenceQueue;
import java.util.Collection;
import java.util.Vector;

/**
 * Keeps track of files awaiting deletion, and deletes them when an associated
 * marker object is reclaimed by the garbage collector.
 * <p>
 * This utility creates a background thread to handle file deletion.
 * Each file to be deleted is registered with a handler object.
 * When the handler object is garbage collected, the file is deleted.
 *
 * @author Noel Bergman
 * @author Martin Cooper
 * @version $Id: FileCleaner.java 289999 2005-09-18 23:12:45Z scolebourne $
 */
public class FileCleaner {

    /**
     * Queue of <code>Tracker</code> instances being watched.
     */
    private static ReferenceQueue /* Tracker */ q = new ReferenceQueue();

    /**
     * Collection of <code>Tracker</code> instances in existence.
     */
    private static Collection /* Tracker */ trackers = new Vector();

    /**
     * The thread that will clean up registered files.
     */
    private static Thread reaper = new Thread("File Reaper") {

        /**
         * Run the reaper thread that will delete files as their associated
         * marker objects are reclaimed by the garbage collector.
         */
        public void run() {
            for (;;) {
                Tracker tracker = null;
                try {
                    // Wait for a tracker to remove.
                    tracker = (Tracker) q.remove();
                } catch (Exception e) {
                    continue;
                }

                tracker.delete();
                tracker.clear();
                trackers.remove(tracker);
            }
        }
    };

    /**
     * The static initializer that starts the reaper thread.
     */
    static {
        reaper.setPriority(Thread.MAX_PRIORITY);
        reaper.setDaemon(true);
        reaper.start();
    }

    /**
     * Track the specified file, using the provided marker, deleting the file
     * when the marker instance is garbage collected.
     *
     * @param file   The file to be tracked.
     * @param marker The marker object used to track the file.
     */
    public static void track(File file, Object marker) {
        trackers.add(new Tracker(file, marker, q));
    }

    /**
     * Track the specified file, using the provided marker, deleting the file
     * when the marker instance is garbage collected.
     *
     * @param path   The full path to the file to be tracked.
     * @param marker The marker object used to track the file.
     */
    public static void track(String path, Object marker) {
        trackers.add(new Tracker(path, marker, q));
    }

    /**
     * Retrieve the number of files currently being tracked, and therefore
     * awaiting deletion.
     *
     * @return the number of files being tracked.
     */
    public static int getTrackCount() {
        return trackers.size();
    }

    /**
     * Inner class which acts as the reference for a file pending deletion.
     */
    private static class Tracker extends PhantomReference {

        /**
         * The full path to the file being tracked.
         */
        private String path;

        /**
         * Constructs an instance of this class from the supplied parameters.
         *
         * @param file   The file to be tracked.
         * @param marker The marker object used to track the file.
         * @param queue  The queue on to which the tracker will be pushed.
         */
        public Tracker(File file, Object marker, ReferenceQueue queue) {
            this(file.getPath(), marker, queue);
        }

        /**
         * Constructs an instance of this class from the supplied parameters.
         *
         * @param path   The full path to the file to be tracked.
         * @param marker The marker object used to track the file.
         * @param queue  The queue on to which the tracker will be pushed.
         */
        public Tracker(String path, Object marker, ReferenceQueue queue) {
            super(marker, queue);
            this.path = path;
        }

        /**
         * Deletes the file associated with this tracker instance.
         *
         * @return <code>true</code> if the file was deleted successfully;
         *         <code>false</code> otherwise.
         */
        public boolean delete() {
            return new File(path).delete();
        }
    }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品女同互慰在线看| 日本伊人午夜精品| 色综合激情五月| 亚洲精品美国一| 欧美日韩国产欧美日美国产精品| 国产精品国产精品国产专区不蜜 | 亚洲不卡一区二区三区| 欧美自拍丝袜亚洲| 五月天中文字幕一区二区| 欧美老女人第四色| 加勒比av一区二区| 国产精品初高中害羞小美女文| 99精品视频在线观看免费| 亚洲一区二区视频在线观看| 欧美日韩精品三区| 国产精品夜夜爽| 亚洲成人免费在线观看| 精品乱人伦小说| 色婷婷av一区二区三区大白胸| 日韩精品成人一区二区三区| 久久久天堂av| 欧美日韩一区二区三区在线看| 久久成人18免费观看| 一区二区三区精密机械公司| 欧美酷刑日本凌虐凌虐| 国产成人av自拍| 免费一级欧美片在线观看| 国产精品免费网站在线观看| 在线不卡欧美精品一区二区三区| 高清视频一区二区| 日本视频一区二区三区| 亚洲一区二区三区自拍| 欧美韩国日本不卡| 欧美草草影院在线视频| 欧美日韩国产另类一区| 99精品久久只有精品| 国产高清不卡一区二区| 九九国产精品视频| 爽爽淫人综合网网站| 亚洲精品国产无天堂网2021| 欧美激情一区二区三区在线| 精品av综合导航| 欧美肥大bbwbbw高潮| 在线视频你懂得一区| 久久精品一区蜜桃臀影院| 欧美不卡激情三级在线观看| 日韩欧美国产一区在线观看| 欧美高清视频不卡网| 91精品欧美久久久久久动漫 | 亚洲精品久久嫩草网站秘色| 国产精品乱码一区二三区小蝌蚪| 中文字幕电影一区| 亚洲色图在线看| 午夜私人影院久久久久| 丝袜美腿亚洲综合| 国产精品18久久久久| 国产成人精品在线看| 99精品国产视频| 欧美日韩精品一区二区天天拍小说 | 777色狠狠一区二区三区| 欧美日韩视频不卡| 亚洲美女视频在线观看| 亚洲男人的天堂一区二区| 日韩av一级片| aa级大片欧美| 日韩视频一区二区三区| 国产欧美日产一区| 天天色天天操综合| 成人黄色777网| 日韩免费看网站| 一区二区不卡在线视频 午夜欧美不卡在 | 久久夜色精品国产欧美乱极品| 日本欧美一区二区| 97久久超碰精品国产| 久久综合久久鬼色| 亚洲影院久久精品| 欧美日韩中字一区| xf在线a精品一区二区视频网站| 中文字幕日韩av资源站| 免费观看在线综合| 欧美性受xxxx| 国产精品毛片高清在线完整版| 美腿丝袜亚洲一区| 欧美美女直播网站| 日韩美女啊v在线免费观看| 国产一区美女在线| 欧美成人福利视频| 日本少妇一区二区| 欧美男生操女生| 亚洲综合小说图片| 欧美三级日韩在线| 亚洲综合色区另类av| 在线免费观看日韩欧美| 亚洲图片激情小说| 91亚洲精品久久久蜜桃网站| 国产欧美精品日韩区二区麻豆天美| 秋霞国产午夜精品免费视频| 欧美影院午夜播放| 日韩精彩视频在线观看| 欧美日韩国产乱码电影| 午夜电影网亚洲视频| 91精品久久久久久久99蜜桃 | 日韩精品一区第一页| 91精品国产一区二区三区 | 中文字幕视频一区| 99精品在线免费| 亚洲第一av色| 精品国产91久久久久久久妲己| 韩国v欧美v日本v亚洲v| 日本一区二区久久| 欧美日韩国产高清一区| 麻豆91免费看| 1区2区3区精品视频| 亚洲精品在线网站| 国产在线精品一区二区三区不卡| 久久久精品日韩欧美| 在线免费一区三区| 极品美女销魂一区二区三区| 国产精品传媒视频| 欧美一卡二卡在线观看| 国产剧情一区二区| 一区二区视频在线| 久久综合色之久久综合| 欧美手机在线视频| 高清不卡在线观看| 日本午夜精品视频在线观看| 国产精品入口麻豆九色| 欧美日本在线观看| 91一区一区三区| 五月婷婷综合在线| 国产凹凸在线观看一区二区| 亚洲va韩国va欧美va| 婷婷综合五月天| 国产综合色精品一区二区三区| 青娱乐精品视频| 亚欧色一区w666天堂| 18欧美亚洲精品| 中文字幕精品一区 | 色乱码一区二区三区88| 国产一二三精品| 九九国产精品视频| 日韩高清不卡在线| 三级一区在线视频先锋| 亚洲成人动漫精品| 午夜视频在线观看一区| 亚洲h精品动漫在线观看| 亚洲精品成人天堂一二三| 亚洲综合在线电影| 日本不卡高清视频| 成人免费三级在线| 91蝌蚪porny| 日韩欧美一区电影| 国产精品久久久久四虎| 亚洲激情第一区| 美女视频网站久久| 国产乱码字幕精品高清av| 97se亚洲国产综合自在线| 91免费看`日韩一区二区| 欧美日韩电影一区| 2欧美一区二区三区在线观看视频 337p粉嫩大胆噜噜噜噜噜91av | 亚洲一区二区在线播放相泽 | 成人蜜臀av电影| 91麻豆精品国产91久久久久久久久| 国产精品国模大尺度视频| 国产麻豆午夜三级精品| 欧美本精品男人aⅴ天堂| 中文字幕一区二区视频| 精品一区二区日韩| 欧美日韩dvd在线观看| 最新不卡av在线| 国产激情一区二区三区四区| 欧美精品少妇一区二区三区| 椎名由奈av一区二区三区| 激情综合网最新| 88在线观看91蜜桃国自产| 亚洲日本成人在线观看| 国产乱码精品一区二区三区忘忧草 | 国产宾馆实践打屁股91| 国产欧美综合在线| 国产精品一区二区久久不卡| 欧美中文字幕一二三区视频| 久久久www成人免费毛片麻豆| 天天色 色综合| 欧美一区二区三区视频免费播放 | 国产精品久久一级| 国产成人av一区二区三区在线| 在线不卡的av| 丝袜a∨在线一区二区三区不卡| 色天使色偷偷av一区二区| 综合久久综合久久| 91亚洲精品久久久蜜桃网站| 日本一区二区在线不卡| 懂色一区二区三区免费观看| 国产欧美日韩另类视频免费观看| 国内成+人亚洲+欧美+综合在线| 精品女同一区二区| 成人av资源站| 日产欧产美韩系列久久99| 欧美国产精品中文字幕| 欧美日韩一级黄|