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

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

?? nullserialport.java

?? JAVA手機短信開發(fā)包
?? JAVA
字號:
/*
 * @(#)NullSerialPort.java	1.12 98/06/25 SMI
 *
 * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved.
 *
 * Sun grants you ("Licensee") a non-exclusive, royalty free, license 
 * to use, modify and redistribute this software in source and binary
 * code form, provided that i) this copyright notice and license appear
 * on all copies of the software; and ii) Licensee does not utilize the
 * software in a manner which is disparaging to Sun.
 *
 * This software is provided "AS IS," without a warranty of any kind.
 * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
 * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
 * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND
 * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY
 * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE
 * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS
 * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT,
 * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES,
 * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING
 * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN
 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
 *
 * This software is not designed or intended for use in on-line control
 * of aircraft, air traffic, aircraft navigation or aircraft
 * communications; or in the design, construction, operation or
 * maintenance of any nuclear facility. Licensee represents and
 * warrants that it will not use or redistribute the Software for such
 * purposes.
 */

package samples.NullDriver;

import	java.io.*;
import  java.util.TooManyListenersException;
import	javax.comm.*;

class NullSerialPort extends SerialPort {

    NullSerialPort(String name) throws IOException {
	this.name = name;
    }

    private InputStream ins;
    public InputStream getInputStream() throws IOException {
	if (closed) throw new IllegalStateException("Port Closed");
	return ins;
    }

    private OutputStream outs;
    public OutputStream getOutputStream()  throws IOException {
	if (closed) throw new IllegalStateException("Port Closed");
	return outs;
    }

    /**
     * The following methods deal with receive thresholds
     */

    private int rcvThreshold = -1;

    public void enableReceiveThreshold(int thresh) 
	throws UnsupportedCommOperationException {

	if (closed) throw new IllegalStateException("Port Closed");
	rcvThreshold = thresh;
    }

    public void disableReceiveThreshold() {
	if (closed) throw new IllegalStateException("Port Closed");
	rcvThreshold = -1;
    }
    public boolean isReceiveThresholdEnabled() {
	if (closed) throw new IllegalStateException("Port Closed");
	return rcvThreshold != -1;
    }
    public int getReceiveThreshold() {
	if (closed) throw new IllegalStateException("Port Closed");
	return rcvThreshold;
    }

    /**
     * The following methods deal with receive timeouts
     */
    int rcvTimeout = -1;

    public void enableReceiveTimeout(int rcvTimeout) 
	throws UnsupportedCommOperationException {

	if (closed) throw new IllegalStateException("Port Closed");
	this.rcvTimeout = rcvTimeout;
    }

    public void disableReceiveTimeout() {
	if (closed) throw new IllegalStateException("Port Closed");
	this.rcvTimeout = -1;
    }

    public int getReceiveTimeout() {
	if (closed) throw new IllegalStateException("Port Closed");
	return rcvTimeout;
    }

    public boolean isReceiveTimeoutEnabled() {
	if (closed) throw new IllegalStateException("Port Closed");
	return rcvTimeout == -1 ? false : true;
    }

    /**
     * The following methods deal with receive framing
     */
    private boolean	framing = false;
    private int		framingByte;
    boolean		framingByteReceived;

    public void disableReceiveFraming() {
	if (closed) throw new IllegalStateException("Port Closed");
	framing = false;
    }

    public void enableReceiveFraming(int framingByte) 
	throws UnsupportedCommOperationException {
	if (closed) throw new IllegalStateException("Port Closed");
	framing = true;
	this.framingByte = framingByte & 0xff;
    }

    public int getReceiveFramingByte() {
	if (closed) throw new IllegalStateException("Port Closed");
	return framingByte;
    }

    public boolean isReceiveFramingEnabled() {
	if (closed) throw new IllegalStateException("Port Closed");
	return framing;
    }

    public void setInputBufferSize(int size) {
	if (closed) throw new IllegalStateException("Port Closed");
    }
    public int getInputBufferSize() {
	if (closed) throw new IllegalStateException("Port Closed");
	return 0;
    }
    public void setOutputBufferSize(int size) {
	if (closed) throw new IllegalStateException("Port Closed");
    }
    public int getOutputBufferSize() {
	if (closed) throw new IllegalStateException("Port Closed");
	return 0;
    }

    /* Serial Port methods */

    private int baudrate;
    private int parity;
    private int dataBits;
    private int stopBits;
    private int flowcontrol;

    public int getBaudRate() {
	if (closed) throw new IllegalStateException("Port Closed");
	return baudrate;
    }
    public int getDataBits() {
	if (closed) throw new IllegalStateException("Port Closed");
	return dataBits;
    }
    public int getStopBits() {
	if (closed) throw new IllegalStateException("Port Closed");
	return stopBits;
    }
    public int getParity() {
	if (closed) throw new IllegalStateException("Port Closed");
	return parity;
    }
    public void setFlowControlMode(int flowcontrol) 
	throws UnsupportCommOperationException {
	if (closed) throw new IllegalStateException("Port Closed");
	this.flowcontrol = flowcontrol;
    }
    public int getFlowControlMode() {
	if (closed) throw new IllegalStateException("Port Closed");
	return flowcontrol;
    }

    public void setSerialPortParams(int baudrate, int dataBits,
	int stopBits, int parity) throws UnsupportedCommOperationException {

	if (closed) throw new IllegalStateException("Port Closed");

	this.baudrate = baudrate;
	this.parity = parity;
	this.dataBits = dataBits;
	this.stopBits = stopBits;

    }

    public void sendBreak(int millis)  {
	if (closed) throw new IllegalStateException("Port Closed");
    }

    private boolean dtr = true;
    public void setDTR(boolean dtr) {

	if (closed) throw new IllegalStateException("Port Closed");

	/*
	 * Illegal to change state of DTR when hardware flow control is on
	 */
	if ((flowcontrol & FLOWCONTROL_RTSCTS_IN) == FLOWCONTROL_RTSCTS_IN) {
	    return;
	}
	this.dtr = dtr;

    }
    public boolean isDTR() {
	if (closed) throw new IllegalStateException("Port Closed");
	return dtr;
    }

    private boolean rts = true;
    public void setRTS(boolean rts) {

	if (closed) throw new IllegalStateException("Port Closed");

	/*
	 * Illegal to change state of RTS when hardware flow control is on
	 */
	if ((flowcontrol & FLOWCONTROL_RTSCTS_IN) == FLOWCONTROL_RTSCTS_IN) {
	    throw new IllegalStateException(
			"Cannot modify RTS when Hardware flowcontrol is on.");
	}

	this.rts = rts;
    }
    public boolean isRTS() {
	if (closed) throw new IllegalStateException("Port Closed");
	return rts;
    }

    public boolean isCTS() {
	if (closed) throw new IllegalStateException("Port Closed");
	return true;
    }

    public boolean isDSR() {
	if (closed) throw new IllegalStateException("Port Closed");
	return true;
    }

    public boolean isRI() {
	if (closed) throw new IllegalStateException("Port Closed");
	return false;
    }

    public boolean isCD() {
	if (closed) throw new IllegalStateException("Port Closed");
	return true;
    }

    public synchronized void addEventListener(SerialPortEventListener lsnr) 
	throws TooManyListenersException
	{

	if (closed) throw new IllegalStateException("Port Closed");

    }

    public synchronized void removeEventListener() {
	if (closed) throw new IllegalStateException("Port Closed");
    }

    public synchronized void notifyOnDataAvailable(boolean notify) {
	if (closed) throw new IllegalStateException("Port Closed");
    }

    public synchronized void notifyOnOutputEmpty(boolean notify) {
	if (closed) throw new IllegalStateException("Port Closed");
    }

    public synchronized void notifyOnCTS(boolean notify) {
	if (closed) throw new IllegalStateException("Port Closed");
    }

    public synchronized void notifyOnDSR(boolean notify) {
	if (closed) throw new IllegalStateException("Port Closed");
    }

    public synchronized void notifyOnCarrierDetect(boolean notify) {
	if (closed) throw new IllegalStateException("Port Closed");
    }

    public synchronized void notifyOnRingIndicator(boolean notify) {
	if (closed) throw new IllegalStateException("Port Closed");
    }

    public synchronized void notifyOnOverrunError(boolean notify) {
	if (closed) throw new IllegalStateException("Port Closed");
    }

    public synchronized void notifyOnParityError(boolean notify) {
	if (closed) throw new IllegalStateException("Port Closed");
    }

    public synchronized void notifyOnFramingError(boolean notify) {
	if (closed) throw new IllegalStateException("Port Closed");
    }

    public synchronized void notifyOnBreakInterrupt(boolean notify) {
	if (closed) throw new IllegalStateException("Port Closed");
    }

    /* finalizer. so we can close the comm port and release native resources */
    protected void finalize() throws Throwable {
    }

    private boolean closed = false;

    public void close() {

	closed = true;
	/*
	 * WARNING *** WARNING *** WARNING *** WARNING *** WARNING *** WARNING
	 * AFTER YOU ARE DONE WITH YOUR OWN close() processing,
	 * YOU MUST MAKE THIS CALL TO CommPort's close(). OTHERWISE
	 * CommPort's HOUSEKEEPING WILL FAIL.
	 * WARNING *** WARNING *** WARNING *** WARNING *** WARNING *** WARNING
	 */
	super.close();

    }

}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日日夜夜免费精品| 蜜桃在线一区二区三区| 亚洲线精品一区二区三区| 亚洲欧美在线另类| 国产精品美女久久久久久 | 一二三区精品视频| 亚洲国产三级在线| 国产一区福利在线| 91国偷自产一区二区三区观看 | 亚洲福利视频一区二区| 视频一区国产视频| 高清国产午夜精品久久久久久| 在线中文字幕一区| 久久久99免费| 视频一区在线播放| 国产成人aaa| 7777精品久久久大香线蕉| 中文字幕第一区第二区| 午夜精品影院在线观看| 99久久久国产精品| 欧美日韩在线三区| 亚洲婷婷综合色高清在线| 久久国产欧美日韩精品| 欧美视频第二页| 中文字幕在线一区| 精品一区二区三区香蕉蜜桃| 欧美亚洲综合久久| 国产日韩欧美精品一区| 一区二区三区成人在线视频| 国产99久久久久| 日韩精品资源二区在线| 青青青伊人色综合久久| 欧美色综合久久| 欧美极品美女视频| 美女网站在线免费欧美精品| 欧美日韩高清影院| 亚洲国产激情av| 国产精品一区二区免费不卡 | 欧美日韩小视频| 国产精品免费av| 色狠狠一区二区三区香蕉| 亚洲黄色片在线观看| 欧美三级三级三级爽爽爽| 亚洲成人资源在线| 日韩一区二区三区在线视频| 捆绑变态av一区二区三区| 精品国产123| 成人亚洲一区二区一| 亚洲人亚洲人成电影网站色| 欧美在线观看你懂的| 日本色综合中文字幕| 2020国产精品久久精品美国| 国产乱码精品一区二区三 | 亚洲一区二区免费视频| 91精品国产麻豆| 国产精品自产自拍| 亚洲男人天堂一区| 欧美精品久久一区二区三区| 久久国产精品露脸对白| 国产精品理伦片| 欧美日韩www| 成人亚洲精品久久久久软件| 一区二区三区在线观看国产| 精品国产亚洲一区二区三区在线观看| 国产乱码精品一区二区三 | 国产精选一区二区三区| 亚洲精品免费视频| 精品国产成人系列| 色综合色狠狠综合色| 捆绑紧缚一区二区三区视频 | 欧美韩国一区二区| 欧美日本不卡视频| 懂色中文一区二区在线播放| 亚洲一区二区美女| 中文字幕av资源一区| 欧美日韩电影在线播放| 成人性生交大片免费看中文网站| 午夜欧美一区二区三区在线播放| 久久免费视频一区| 7777精品伊人久久久大香线蕉| 成人午夜视频网站| 九一久久久久久| 丝袜亚洲另类丝袜在线| 亚洲色欲色欲www在线观看| 精品乱码亚洲一区二区不卡| 91美女视频网站| 国产黑丝在线一区二区三区| 视频在线观看一区| 亚洲综合一区二区精品导航| 国产欧美精品一区二区色综合朱莉| 欧美日韩精品一区二区三区四区| 成人免费高清在线观看| 国内精品自线一区二区三区视频| 亚洲丰满少妇videoshd| 亚洲丝袜精品丝袜在线| 国产丝袜在线精品| 26uuu欧美| 亚洲精品在线三区| 欧美成人免费网站| 日韩你懂的电影在线观看| 欧美三级韩国三级日本三斤| 色吧成人激情小说| 91小宝寻花一区二区三区| 成人午夜免费av| 成人午夜激情片| 国产精品99久久久久久似苏梦涵 | 日韩精品国产欧美| 亚洲成人一区二区| 亚洲成人1区2区| 亚洲综合av网| 亚洲亚洲人成综合网络| 亚洲综合久久久| 亚洲va欧美va人人爽| 香港成人在线视频| 日本强好片久久久久久aaa| 亚洲成人av福利| 日本欧美一区二区三区| 免费观看成人av| 国内不卡的二区三区中文字幕| 加勒比av一区二区| 国产在线精品免费| 处破女av一区二区| 一本一本久久a久久精品综合麻豆| 97国产一区二区| 欧美写真视频网站| 欧美一区午夜精品| 久久蜜桃av一区二区天堂| 国产网站一区二区三区| 自拍偷自拍亚洲精品播放| 亚洲一区二区3| 日韩av网站免费在线| 久久99久久精品| 国产aⅴ综合色| 色综合天天综合在线视频| 91久久精品日日躁夜夜躁欧美| 在线观看视频欧美| 91精品国产91久久综合桃花| 久久嫩草精品久久久精品| 国产精品免费视频网站| 亚洲一区二区三区四区的| 麻豆91免费看| 成人91在线观看| 欧美日韩国产在线播放网站| 精品久久久三级丝袜| 国产精品久99| 婷婷亚洲久悠悠色悠在线播放| 极品少妇xxxx精品少妇偷拍| 成人99免费视频| 91精品婷婷国产综合久久竹菊| 久久九九影视网| 亚洲综合网站在线观看| 国内精品视频一区二区三区八戒| 99国产精品国产精品久久| 91精品国产综合久久久蜜臀图片 | 91啦中文在线观看| 日韩欧美中文字幕制服| 日本一区二区三区在线不卡| 亚洲一区二区三区免费视频| 国产尤物一区二区在线 | 不卡一区二区三区四区| 欧美精三区欧美精三区| 中文字幕高清不卡| 麻豆精品视频在线观看免费| 99精品视频在线免费观看| 日韩欧美一区二区视频| 亚洲激情一二三区| 国产一区二区三区视频在线播放| 欧美视频自拍偷拍| 国产精品免费视频观看| 精品一区二区三区视频| 欧美日韩视频专区在线播放| 国产精品国产三级国产专播品爱网| 日本中文字幕不卡| 欧美羞羞免费网站| 国产精品高清亚洲| 狠狠色丁香婷婷综合| 欧美一区二区视频观看视频| 亚洲精品日韩综合观看成人91| 粉嫩av亚洲一区二区图片| 精品国产乱码久久久久久久| 日韩福利电影在线观看| 欧美亚洲禁片免费| 亚洲三级免费电影| www.亚洲精品| 久久精品一区二区三区四区| 日本aⅴ亚洲精品中文乱码| 欧美日韩高清一区二区三区| 亚洲自拍偷拍图区| 99re视频精品| 亚洲欧美日韩久久| 成年人午夜久久久| 国产精品欧美极品| 成人性生交大片免费看在线播放| 久久九九99视频| 国产精品综合一区二区| 久久久精品国产免费观看同学| 国产在线观看免费一区| 久久这里只有精品6| 国产伦精品一区二区三区视频青涩| 日韩一区二区在线免费观看|