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

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

?? usb.java

?? JAVA 訪問USB JAVA 訪問USB JAVA 訪問USB JAVA 訪問USB JAVA 訪問USB JAVA 訪問USB
?? JAVA
字號:
/* * Java USB Library * Copyright (C) 2000 by David Brownell * Copyright (C) 2002 by Wayne Westerman * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA *  * */package usb.windows;import java.util.Vector;import java.util.Enumeration;import java.util.Hashtable;import java.io.IOException;import usb.core.*;/** * Represents a Universal Serial Bus (USB) which hosts a set of * devices. Such busses are largely autoconfiguring. Aspects such as * power managemnet and detailed device configuration involve  * policy choices. * * @author  mike * @version $id: USB.java, v1.0 Created on 11. Juli 2003, 23:41 */public class USB implements Bus{        /** @serial the host to which this bus is connected */    private final Host host;         /**      * Remember that one Host Controller represents one USB bus.      * The hostControllerName looks like :     * "Intel(R) 82801DB/DBM USB Universal Host Controller - 24C2"     */    private final transient String hostControllerName;        /**     * Its internally used to connect to a USB Host Controller      * on Windows.      * The hostControllerDevicePath looks like:     * "\\?\pci#ven_8086&dev_24c4&subsys_45418086&rev_03#3&61aaa01&0&e9#{3abf6f2d-71c4-462a-8a92-1e6861e6af27}"     */    private final transient String hostControllerDevicePath;        private final int busnum;        private final transient Vector listeners;        // all devices which are currently attached to the bus    private final transient DeviceImpl devices[] = new DeviceImpl [127];        // all devices which are attached during the last scan    private transient DeviceImpl oldDevices[] = new DeviceImpl [127];    /**     * Used to indicate that enumerating of the device is finished     */    private boolean finishedEnumerating;        private boolean finishScanBus;       /**      *       *     */    USB(String hcdName, String hcdDevicePath, int b, Vector l, Host h) {        hostControllerName = hcdName;        hostControllerDevicePath = hcdDevicePath;        busnum = b;        listeners = l;        host = h;        if(Windows.debugUSB) System.out.println("USB.Constructor() >>> BUS["+ busnum +"]   hcdDevicePath:" + hostControllerDevicePath + " " );        try{            this.setFinishScanBusFalse();            boolean done = false;             while(!this.finishScanBus){                if(!done){                    if(Windows.debugUSB) System.out.println("USB.Constructor() >>> start scanBus BUS["+busnum+"]!");                    scanBus();                    done = true;                }            }                     Windows.createUSB = true;          }catch(IOException e){          System.out.println("scanBus Failed!" + e.getMessage());          }            }        /**     * returns the roothub name or null in case there exists roothub     */    private native String getRootHubName(String hcdDevicePath);         /**     * Returns the USB host for this bus     */    public Host getHost(){        return host;    }    /**     * Returns the number assigned to this bus     */    public int getBusNum(){        return busnum;    }        /**     * Returns the host controller name for this Universal Serial Bus     */     public String getBusId(){        if(hostControllerName == null) return null;        else return hostControllerName;    }         /** Returns the device with the given address.      * @param address The device address <br>      * 0: Always the root hub      * 1..126: devices or hubs or null      */          public Device getDevice(int address) throws IOException {         return devices[address];     }              /** Returns the root hub of that bus */          public Device getRootHub() throws IOException {         return devices[0];     }               /**      * used to be boolean      */      void scanBus() throws IOException{                  if(Windows.debugUSB) System.out.println(this.finishedEnumerating +" USB.scanBus() >>> scan BUS["+ busnum +"]");                 String rootHubName;         DeviceImpl rootHub;                  // init the bus and get all its         // attached devices and hubs         // get the RootHubName and create it         rootHubName =  getRootHubName(hostControllerDevicePath);         if (rootHubName == null) throw new USBException("Root hub name not found");                    //check if root hub has changed         DeviceImpl root = devices[0];         if(root != null && !root.getDevicePath().equals("\\\\.\\" + rootHubName)){             // root hub has changed             // in that case all devices need to be removed from the              // current usb bus.              if(Windows.debugUSB) System.out.println(this.finishedEnumerating +" USB.scanBus() >>> root hub of BUS["+busnum +"] has changed! remove all former devices from this bus!");             kill();         }         // The root hub has not changed or does not exists         // In either way create a root hub instance of the root hub.         // This is a little overhead, in the case when there exists         // already a root hub. In that case the root hub will be replaced         // through the new one.         // All other changes on the bus are now managed by the devices itself.         // Therefore we need to give the old device list to the first instance of         // DeviceImpl.         // The root hub will be added to the bus.         // The root hub recursively calls its ports         // and will add each device that is connected to          // this root hub         // look at the DeviceImpl constructor                  this.finishedEnumerating = false;         boolean done = false;         rootHub = null;         while(!this.finishedEnumerating){                         if(!done){                if(Windows.debugUSB) System.out.println(this.finishedEnumerating +" USB.scanBus() >>> start enumerating!");                rootHub = new NonJUSB(this, "\\\\.\\"+ rootHubName,0,oldDevices);                done = true;            }         }                    if(root == null){            //there exists no root hub so far            //we have to add it and all USBListener have to be informed            this.addDevice(rootHub ,0 );            }else{           // there is already a root hub           // to make sure that the USBListener does not notify the           // user about a device changes we add           this.addDeviceWithNoNotification(rootHub ,0 );             }                    //update the oldDevices         //this.oldDevices = devices;         copyArray(this.devices, this.oldDevices);         this.setFinishScanBusTrue();              }              /**      * adds a device to this bus and notify the USBListeners      * This method is used in DeviceImpl.enumerateHubPorts to add a      * device, an external hub or the root hub to the bus      */     synchronized void addDevice(DeviceImpl dev,int address){               if(dev == null) devices[address] = dev;      else {devices[dev.getAddress()] = dev;      if(Windows.debugUSB){          System.out.print("USB.addDevice() >>> Bus [" + busnum+ "] : ");          if(dev == null) System.out.println("NULL");          else  if(dev.getAddress() == 0) System.out.println("ROOT         []  Root Addr[" +  dev.getAddress()+ "]");          else if(dev.getNumPorts() > 0) System.out.println("EXTERNAL HUB [" + dev.getUniqueDeviceID() + "]  on Port[" + dev.getHubPortNum() + "]   Hub Addr[" +  dev.getAddress()+ "]");          else System.out.println("USB DEVICE   [" + dev.getUniqueDeviceID() + "]  on Port[" + dev.getHubPortNum() + "]   Dev Addr[" +  dev.getAddress()+ "]");       }	// call synch'd on devices	for (int i = 0; i < listeners.size (); i++) {	    USBListener	listener;	    listener = (USBListener) listeners.elementAt (i);	    try { listener.deviceAdded (dev); }	    catch (Exception e) {		if (Windows.debug)		    e.printStackTrace ();	    }	}      }     }     /**      * adds a device to this bus but does not notify its USBListeners      * This is used so far only for the the rootHub:      * If a rootHub did not change.       *      */    synchronized void addDeviceWithNoNotification(DeviceImpl dev,int address){               if(dev == null) devices[address] = dev;      else {devices[dev.getAddress()] = dev;       //devices[address] = dev;       if(Windows.debugUSB){          System.out.print("USB.addDeviceWithNoNotification() >>> Bus [" + busnum+ "] : ");          if(dev == null) System.out.println("NULL");          else  if(dev.getAddress() == 0) System.out.println("ROOT         []  Root Addr[" +  dev.getAddress()+ "]");          else if(dev.getNumPorts() > 0) System.out.println("EXTERNAL HUB [" + dev.getUniqueDeviceID() + "]  on Port[" + dev.getHubPortNum() + "]   Hub Addr[" +  dev.getAddress()+ "]");          else System.out.println("USB DEVICE   [" + dev.getUniqueDeviceID() + "]  on Port[" + dev.getHubPortNum() + "]   Dev Addr[" +  dev.getAddress()+ "]");       }      }     }     /**      * removes a device from this bus and notify the USBListeners      * This method is used in DeviceImpl.enumerateHubPorts to remove a      * device or an external hub.      *       */     synchronized void removeDevice(DeviceImpl dev){              devices[dev.getAddress()] = null;       if(Windows.debugUSB){          System.out.print("USB.removeDevice() >>> Bus [" + busnum+ "] : ");          if(dev == null) System.out.println("NULL");          else  if(dev.getAddress() == 0) System.out.println("ROOT         []  Root Addr[" +  dev.getAddress()+ "]");          else if(dev.getNumPorts() > 0) System.out.println("EXTERNAL HUB [" + dev.getUniqueDeviceID() + "]  on Port[" + dev.getHubPortNum() + "]   Hub Addr[" +  dev.getAddress()+ "]");          else System.out.println("USB DEVICE   [" + dev.getUniqueDeviceID() + "]  on Port[" + dev.getHubPortNum() + "]   Dev Addr[" +  dev.getAddress()+ "]");       }       	       // call synch'd on devices	for (int i = 0; i < listeners.size (); i++) {	    USBListener	listener;	    listener = (USBListener) listeners.elementAt (i);	    try { listener.deviceRemoved (dev); }	    catch (Exception e) {		if (Windows.debug)		    e.printStackTrace ();	    }	}      }         // package private    synchronized void kill()    {	if (Windows.debugUSB)	    System.err.println ("USB.kill() >>> kill BUS["+ busnum +"]");	// notify any listeners that the bus died, and	// clear backlinks that we control	if (listeners.size () > 0) {	    synchronized (devices) {		for (int i = 0; i < devices.length; i++) {		    if (devices [i] == null)			continue;		    removeDevice(devices [i]);		}	    }	}    }        /** Used as a semaphore */       void setFinishEnumerating(){       if (Windows.debugUSB)   System.err.println ("USB.setFinishEnumerating() >>> Enumerating finished for BUS["+ busnum +"]");              this.finishedEnumerating = true;   }   /** Used as a semaphore */      void setFinishScanBusTrue(){       if (Windows.debugUSB)   System.err.println ("USB.setFinishScanBusTrue() >>> Scan bus finished for BUS["+ busnum +"]");              this.finishScanBus = true;   }      /** used as a semaphore */      void setFinishScanBusFalse(){       this.finishScanBus = false;   }   /** used as a semaphore */      boolean getFinishScanBus(){       return  this.finishScanBus;   }      /**    * copy the one Array to the other Array    */    private void copyArray(DeviceImpl devfrom [], DeviceImpl devto[]){       if (Windows.debugUSB)  System.out.println(this.finishedEnumerating +" "+this.finishScanBus+ "USB.copyArray() >>> BUS["+ busnum +"]");        for(int i=0 ; i < devfrom.length ; i++){            devto[i] = devfrom[i];        }    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美aaaaaa午夜精品| 国产成人精品一区二区三区四区| 日韩中文字幕一区二区三区| 国产成人av电影免费在线观看| 欧美日韩免费观看一区二区三区| 26uuuu精品一区二区| 亚洲一区二区免费视频| 粉嫩aⅴ一区二区三区四区五区| 欧美日韩不卡视频| 中文字幕综合网| 极品销魂美女一区二区三区| 欧美日韩你懂的| 亚洲一区二区三区中文字幕| a美女胸又www黄视频久久| 国产欧美日韩在线观看| 狠狠狠色丁香婷婷综合久久五月| 色婷婷激情一区二区三区| 久久久亚洲精品石原莉奈| 免费在线观看日韩欧美| 欧美日产国产精品| 亚洲午夜私人影院| 色狠狠一区二区| 亚洲欧美日韩国产中文在线| 99在线精品免费| 亚洲欧洲无码一区二区三区| 国产精品一二三四五| 精品国产污污免费网站入口 | 欧美精品成人一区二区三区四区| 一色桃子久久精品亚洲| 色综合久久综合中文综合网| 中文字幕亚洲一区二区va在线| 国产精品1区2区3区在线观看| 久久综合色综合88| 国产剧情av麻豆香蕉精品| 久久人人97超碰com| 经典三级一区二区| 久久久91精品国产一区二区精品 | 成人三级在线视频| 中文字幕av一区二区三区免费看| 国产一区二区三区在线观看免费| wwwwww.欧美系列| 国产精品综合二区| 国产精品久久久久久一区二区三区| 波多野结衣中文一区| 亚洲欧美日韩国产手机在线 | 天天综合日日夜夜精品| 欧美日韩的一区二区| 蜜臀久久99精品久久久久久9| 欧美一区二区三区电影| 久久国产精品99久久人人澡| 中文字幕免费不卡| 色综合天天综合在线视频| 亚洲国产一区二区a毛片| 欧美一区二区三区性视频| 韩国av一区二区三区在线观看| 中文久久乱码一区二区| 日本高清无吗v一区| 奇米777欧美一区二区| 国产性做久久久久久| 91蜜桃婷婷狠狠久久综合9色| 亚洲永久精品国产| 精品久久久久久亚洲综合网| 成人av免费在线观看| 午夜成人免费视频| 久久精品一区八戒影视| 在线观看不卡一区| 国产成人久久精品77777最新版本| 亚洲视频一区二区免费在线观看| 51久久夜色精品国产麻豆| 国产成人精品aa毛片| 午夜不卡av在线| 日韩一区有码在线| 日韩欧美另类在线| 91在线国产福利| 国产乱码一区二区三区| 亚洲国产视频在线| 一区免费观看视频| 精品剧情v国产在线观看在线| 99久久国产综合精品女不卡| 久久精工是国产品牌吗| 亚洲激情图片小说视频| 精品国内二区三区| 在线精品亚洲一区二区不卡| 激情综合色综合久久综合| 亚洲精品国产成人久久av盗摄 | 日韩丝袜情趣美女图片| 色综合夜色一区| 国产成人在线观看免费网站| 日韩精品成人一区二区三区| 中文字幕日韩欧美一区二区三区| 久久影院午夜论| 宅男噜噜噜66一区二区66| 色综合天天综合色综合av| 国产成人亚洲综合a∨猫咪| 日韩av电影一区| 国产精品成人免费| 久久精品日产第一区二区三区高清版 | 自拍av一区二区三区| 久久综合av免费| 欧美成人精精品一区二区频| 欧美日韩精品综合在线| 91视频一区二区三区| av中文字幕亚洲| av在线不卡电影| 岛国精品在线观看| 国产成人免费av在线| 国产精品白丝jk白祙喷水网站| 美女网站色91| 精品一区二区三区免费| 奇米色一区二区三区四区| 日韩av中文字幕一区二区| 视频一区欧美日韩| 日韩精品免费专区| 日韩成人精品视频| 蜜臀久久99精品久久久久宅男| 蜜桃av噜噜一区| 另类小说视频一区二区| 激情国产一区二区 | 日韩av网站免费在线| 视频一区中文字幕| 美女在线一区二区| 国内精品在线播放| 风间由美性色一区二区三区| 岛国精品在线观看| 在线中文字幕不卡| 欧美体内she精高潮| 91精品国产91久久综合桃花 | 国产精品萝li| 最新成人av在线| 亚洲精品乱码久久久久久久久| 亚洲乱码国产乱码精品精小说| 亚洲激情校园春色| 免费欧美高清视频| 国产精品一卡二卡| 91免费视频网址| 欧美高清视频一二三区 | 婷婷中文字幕综合| 久久精品99国产国产精| 99久久国产综合色|国产精品| 欧洲一区二区av| 欧美一区二区私人影院日本| 久久综合九色综合久久久精品综合| 国产精品久久久久久户外露出 | 亚洲成人一区在线| 韩国v欧美v日本v亚洲v| 91色综合久久久久婷婷| 欧美疯狂性受xxxxx喷水图片| 日韩一区二区不卡| 日韩一区中文字幕| 久久精品国产**网站演员| 99精品视频在线播放观看| 欧美日韩视频专区在线播放| 精品福利一二区| 一区二区三区四区乱视频| 免费成人在线影院| 91丨九色丨国产丨porny| 日韩一级二级三级精品视频| 亚洲欧洲精品一区二区三区| 麻豆免费看一区二区三区| 91在线观看污| 久久综合九色综合久久久精品综合| 一区二区三区四区乱视频| 国产精品一区二区在线播放| 欧美三级韩国三级日本三斤 | 精品国产乱码久久久久久久久| 自拍偷拍亚洲激情| 国产在线精品视频| 欧美婷婷六月丁香综合色| 国产精品人成在线观看免费 | 精品欧美乱码久久久久久1区2区 | 奇米影视7777精品一区二区| 99精品欧美一区二区蜜桃免费 | 一二三四区精品视频| 成人深夜视频在线观看| 精品处破学生在线二十三| 午夜不卡av免费| 日本韩国一区二区三区视频| 国产欧美日韩一区二区三区在线观看| 日本在线不卡一区| 欧美日韩国产一级片| 亚洲精品欧美激情| 波多野结衣亚洲一区| 久久精品视频一区| 国产在线一区二区| 精品久久久久一区| 美女诱惑一区二区| 日韩女优制服丝袜电影| 亚洲成人免费视频| 欧美日韩一区二区欧美激情| 亚洲精品高清在线| 91在线国产福利| 中文字幕一区免费在线观看| 国产 日韩 欧美大片| 中文字幕欧美三区| 99在线精品视频| 亚洲青青青在线视频| 91福利精品视频| 午夜久久久久久| 日韩三级视频在线观看| 麻豆精品一区二区综合av|