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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? watchedinputstream.java

?? jxta平臺(tái)的開(kāi)發(fā)包
?? JAVA
字號(hào):
/* * Copyright (c) 2001 Sun Microsystems, Inc.  All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright *    notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright *    notice, this list of conditions and the following disclaimer in *    the documentation and/or other materials provided with the *    distribution. * * 3. The end-user documentation included with the redistribution, *    if any, must include the following acknowledgment: *       "This product includes software developed by the *       Sun Microsystems, Inc. for Project JXTA." *    Alternately, this acknowledgment may appear in the software itself, *    if and wherever such third-party acknowledgments normally appear. * * 4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must *    not be used to endorse or promote products derived from this *    software without prior written permission. For written *    permission, please contact Project JXTA at http://www.jxta.org. * * 5. Products derived from this software may not be called "JXTA", *    nor may "JXTA" appear in their name, without prior written *    permission of Sun. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED.  IN NO EVENT SHALL SUN MICROSYSTEMS OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of Project JXTA.  For more * information on Project JXTA, please see * <http://www.jxta.org/>. * * This license is based on the BSD license adopted by the Apache Foundation. * * $Id: WatchedInputStream.java,v 1.6 2004/05/30 12:27:40 jice Exp $ */package net.jxta.util;import java.io.*;import java.util.Collection;public class WatchedInputStream extends FilterInputStream    implements WatchedStream {    static final int DEFAULT_CHUNK_SIZE = 4096;    Collection watchList = null;    volatile boolean stalled = false;    volatile boolean idle = true;    boolean closed = false;    final int chunkSize;    InputStream in = null;    public WatchedInputStream(InputStream in, int chunkSize) {        super(in);        this.in = in;        this.chunkSize = chunkSize;    }    public WatchedInputStream(InputStream in) {        this(in, DEFAULT_CHUNK_SIZE);    }    /**     * {@inheritDoc}     *     *  <p/>Debugging toString.     **/    public String toString() {        if( null == in ) {            return "closed/" + super.toString();        } else {            if( in instanceof ByteArrayInputStream ) {                // ByteArrayInputStream.toString() prints the entire stream!                 return in.getClass().getName() + "@" + System.identityHashCode(in)  + "/" + super.toString();            } else {                return in.toString() + "/" + super.toString();            }        }    }        /**     * Sets the watcher list onto which this stream must register     * when it is not idle (so that it can be watched).     * This implementation may or may not remain registered while idle.     * This may affect performance but not functionality.     * It is assumed that that list is monitored by a watcher task that     * invokes the watch method as often as needed to monitor progress     * to its satifaction.     *     * @param watchList The watchList to register with. Must be a     * Synchronized Collection.     */    public synchronized void setWatchList(Collection watchList) {        if (this.watchList != null) {            this.watchList.remove(this);        }        this.watchList = watchList;        watchList.add(this);    }		    // This routine may be invoked as often as progress needs to be asserted.    // After at most two watch cycles stalling is detected.    public void watch() {        if (idle) return;        if (! stalled) {            stalled = true; // challenge a write method to clear that flag.            return;        }        // It's stalled. The last time around it was not idle, so we set the        // stalled flag. Now, it is still not idle and the flag is still there.        // break the stream.        try {            close();        } catch (IOException ioe) { ; }    }    public void close() throws IOException {        idle = true;        synchronized(this) {            if (watchList != null) {                watchList.remove(this);                watchList = null;            }            // Avoid calling close redundantly; some OSes seem to have            // deadlock capabilities when doing that.                        if (closed) return;            closed = true;        }        super.close();    }    public int read() throws IOException {        stalled = false;        idle = false;        try {            return in.read();        } finally {            idle = true;        }    }    // We overload it; not trusting that the base classes method does    // call read(byte[], int, int) in the future.    public int read(byte[] b) throws IOException {        return read(b, 0, b.length);    }    public int read(byte[] b, int off, int len) throws IOException {        // Apply the standard checks here; we will call in.read repeatedly        // which means that errors could be discovered too late per read's        // contract.        if (   (off < 0) || (len < 0) || ((off + len) > b.length)            || ((off + len) < 0)) {	    throw new IndexOutOfBoundsException();	}        stalled = false;        idle = false;        int left = len;        try {            int i = 0;            while (left > chunkSize) {                i = in.read(b, off, chunkSize);                stalled = false;                if (i <= 0) {                    if (left == len) return i;                    return len - left;                }                off += i;                left -= i;                // Must check available only after firt read.                // first read must wait for at least one byte.                if (in.available() == 0) {                    return len - left;                }            }            // Read the left over now. If this is not the first read,            // available has been checked in the loop above.            i = in.read(b, off, left);            if (i <= 0) {                if (left == len) return i;                return len - left;            }            return len - left + i;        } finally {            idle = true;        }    }}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩av电影免费观看高清完整版| 欧美一区二区福利视频| 欧美在线不卡视频| 欧美日韩久久久| 日韩精品影音先锋| 国产精品初高中害羞小美女文| 亚洲国产视频一区| 久久97超碰国产精品超碰| 成人小视频在线| 欧美日韩一本到| 久久免费午夜影院| 亚洲自拍偷拍av| 国产一区二区免费视频| 色www精品视频在线观看| 欧美一区二区精美| 亚洲日本韩国一区| 精品一区二区三区视频| 色综合咪咪久久| 国产69精品久久99不卡| 99在线视频精品| 91精品国产全国免费观看| 国产精品成人免费| 麻豆精品视频在线| 在线视频国内自拍亚洲视频| 久久久久国产精品人| 亚洲动漫第一页| 成人在线一区二区三区| 日韩你懂的在线播放| 亚洲精品va在线观看| 国产精品综合久久| 3d成人h动漫网站入口| 亚洲视频一区在线观看| 国产在线不卡视频| 欧美精品丝袜中出| 亚洲欧洲精品成人久久奇米网| 久久成人免费网| 欧美日韩一区二区三区四区五区 | 亚洲午夜视频在线观看| 国产成人午夜精品5599| 日韩欧美国产综合一区| 亚洲一区二区高清| 91小视频免费看| 国产日产精品1区| 久久精品国产亚洲5555| 欧美日韩国产精品自在自线| 国产精品不卡在线| 国产aⅴ精品一区二区三区色成熟| 欧美一级日韩一级| 天天色综合天天| 在线观看日产精品| 亚洲日本va在线观看| 成人久久视频在线观看| 久久精品一区二区三区不卡牛牛| 视频一区免费在线观看| 欧美日韩综合不卡| 亚洲欧洲制服丝袜| 大胆欧美人体老妇| 久久九九久久九九| 国产一区二区在线看| 欧美一区二区三级| 日韩电影在线免费| 91精品国产综合久久久久久久| 亚洲国产综合视频在线观看| 99国内精品久久| 国产精品久久久久婷婷二区次| 国产精品亚洲人在线观看| 精品少妇一区二区三区在线播放| 琪琪一区二区三区| 欧美一区二区三区日韩| 日本不卡在线视频| 91精品国产综合久久精品| 日本一道高清亚洲日美韩| 91精品婷婷国产综合久久竹菊| 婷婷开心激情综合| 欧美蜜桃一区二区三区| 视频一区欧美精品| 91精品视频网| 久草在线在线精品观看| 久久久综合精品| 懂色av噜噜一区二区三区av | 91丨九色丨尤物| 成人免费在线观看入口| 一本色道亚洲精品aⅴ| 亚洲色图另类专区| 欧美丝袜自拍制服另类| 天天操天天色综合| 欧美大肚乱孕交hd孕妇| 极品销魂美女一区二区三区| 久久先锋影音av| 成人精品一区二区三区四区 | 91性感美女视频| 亚洲综合成人在线| 欧美一区二视频| 美女视频免费一区| 国产午夜亚洲精品不卡| 91丝袜美腿高跟国产极品老师 | 色婷婷av久久久久久久| 亚洲国产一区二区三区青草影视| 69堂亚洲精品首页| 精品一区二区三区在线观看| 中文字幕欧美日本乱码一线二线| 91在线免费播放| 亚洲午夜日本在线观看| 欧美一级黄色大片| 国产精品99久久久久| 亚洲欧美自拍偷拍| 精品视频全国免费看| 久久 天天综合| 自拍偷拍欧美精品| 9191国产精品| 国产一区91精品张津瑜| 最新日韩av在线| 3d成人动漫网站| 成人一区二区三区中文字幕| 一区二区不卡在线视频 午夜欧美不卡在| 欧美精品丝袜久久久中文字幕| 国内久久婷婷综合| 一区二区三区色| 精品国产3级a| 欧洲中文字幕精品| 国产一区二区三区不卡在线观看| 亚洲免费av在线| 日韩精品一区二区三区视频 | 亚洲尤物在线视频观看| 欧美成人综合网站| 一本大道久久a久久综合婷婷| 日本视频免费一区| 亚洲日本成人在线观看| 日韩精品最新网址| 色老头久久综合| 国产在线精品不卡| 一区二区三区产品免费精品久久75| 亚洲精品在线三区| 欧美三级在线看| 成人av电影在线观看| 日本特黄久久久高潮| 亚洲女与黑人做爰| 国产婷婷一区二区| 6080国产精品一区二区| 91丝袜美女网| 国产成人自拍高清视频在线免费播放| 一区二区久久久| 欧美国产精品一区二区三区| 91精品国产综合久久久久久漫画| 91丨九色丨蝌蚪富婆spa| 国精产品一区一区三区mba桃花| 夜夜精品视频一区二区| 欧美国产禁国产网站cc| 精品久久久三级丝袜| 欧美高清hd18日本| 在线精品视频免费播放| 成人动漫av在线| 国产一区二区毛片| 日本免费在线视频不卡一不卡二| 亚洲美女免费在线| 国产日韩欧美一区二区三区乱码| 日韩三区在线观看| 欧美色视频在线观看| 91在线播放网址| 成人一区二区三区视频在线观看| 经典三级视频一区| 日本亚洲欧美天堂免费| 午夜欧美2019年伦理| 夜夜嗨av一区二区三区四季av| 中文字幕乱码亚洲精品一区| 精品国产91九色蝌蚪| 日韩限制级电影在线观看| 欧美精品久久一区| 欧美亚洲国产一区二区三区 | 亚洲黄色片在线观看| 国产精品人妖ts系列视频| 国产日韩综合av| 久久久精品影视| 欧美日韩不卡一区| 亚洲高清免费视频| 欧美亚洲高清一区二区三区不卡| 国产亚洲精久久久久久| 国产一区二区精品久久91| 精品久久人人做人人爰| 国产美女视频91| 久久婷婷国产综合精品青草| 极品销魂美女一区二区三区| 久久综合九色综合欧美98| 麻豆一区二区在线| 久久久另类综合| 成人综合在线观看| 亚洲人成人一区二区在线观看| 99久久精品国产网站| 欧美一级片免费看| 国产成人免费视频| 亚洲欧美成aⅴ人在线观看| 欧美三级一区二区| 蜜桃久久久久久| 久久精品亚洲麻豆av一区二区| 国产精品一区专区| 日本v片在线高清不卡在线观看| 亚洲一二三区视频在线观看| 欧美精品一区男女天堂| 极品销魂美女一区二区三区| 精品国产不卡一区二区三区|