📄 device.java
字号:
/* * Device.java * * Created on 15. oktober 2005, 15:19 * * To change this template, choose Tools | Options and locate the template under * the Source Creation and Management node. Right-click the template and choose * Open. You can then make changes to the template in the Source Editor. */package burningtools; import java.lang.*;import java.io.*;import java.util.*;/** * * @author Thomas */public class Device { static private int numberOfDevices = 0; private String deviceType; private int version; private int responseFormat; private String vendorInfo; private String identification; private String revision; private String description; private boolean atapi; private int scsibus; private int target; private int lun; private boolean isCDdevice = false; private boolean isDVDdevice = false; private boolean writeCDr, writeCDrw; private boolean writeDVDr, writeDVDram; private int[] CDwriteSpeed; private int[] DVDwriteSpeed; // Insert instead private Medium medium; private boolean diskIsLoadet; private String diskType; private int diskCapasity; /** Creates a new instance of Device */ public Device(int scsibus, int target, int lun, boolean atapi) { this.numberOfDevices++; this.scsibus = scsibus; this.target = target; this.lun = lun; this.atapi = atapi; this.collectDeviceInfo(); } public boolean getAtapi() { return this.atapi; } public int getScsibus() { return this.scsibus; } public int getTarget() { return this.target; } public int getLun() { return this.lun; } public void getDriverInfo() { System.out.println("GENERAL DEVICE INFO:"); System.out.println("Device Type: " + this.deviceType); System.out.println("Version: " + this.version); System.out.println("Response Format: " + this.responseFormat); System.out.println("Vendor Info: " + this.vendorInfo); System.out.println("Identification: " + this.identification); System.out.println("Revision: " + this.revision); System.out.println("Description: " + this.description); System.out.println("OPTICAL MEDIA INFO:"); System.out.println("Device is CD-ROM: " + this.isCDdevice); System.out.println("Device is DVD-ROM: " + this.isDVDdevice); System.out.println("Device writes CD-R: " + this.writeCDr); System.out.println("Device writes CD-RW: " + this.writeCDrw); System.out.println("Device writes DVD-R: " + this.writeDVDr); System.out.println("Device writes DVD-RAM: " + this.writeDVDram); } public boolean isBurningDevices() { boolean canBurn = false; if ((this.writeCDr) || (this.writeDVDr)) { canBurn = true; } return canBurn; } public boolean isCDBurningDevice() { return writeCDr; } public boolean isDVDBurningDevice() { return writeDVDr; } public int getNumberOfDevices() { return this.numberOfDevices; } public void setDeviceInfo(String deviceType, int version, int responseFormat, String vendorInfo, String identification, String revision, String description) { this.deviceType = deviceType; this.version = version; this.responseFormat = responseFormat; this.vendorInfo = vendorInfo; this.identification = identification; this.revision = revision; this.description = description; } public void setDeviceCdDvdInfo(boolean isCDdevice, boolean isDVDdevice, boolean writeCDr, boolean writeCDrw, boolean writeDVDr, boolean writeDVDram) { this.isCDdevice = isCDdevice; this.isDVDdevice = isDVDdevice; this.writeCDr = writeCDr; this.writeCDrw = writeCDrw; this.writeDVDr = writeDVDr; this.writeDVDram = writeDVDram; } public void collectDeviceInfo() { CdRecordController.getCdRecord().deviceCapabilities(this); } public void updateDiskInfo() { //TODO: Update medium information } public String toString() { return deviceType + " " + identification; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -