idecdromdriver.java

来自「纯java操作系统jnode,安装简单和操作简单的个人使用的Java操作系统」· Java 代码 · 共 73 行

JAVA
73
字号
/*
 * $Id: IDECDROMDriver.java,v 1.2 2003/11/29 17:20:24 gbin Exp $
 */
package org.jnode.driver.ide;

import java.io.IOException;

import org.jnode.driver.Device;
import org.jnode.driver.Driver;
import org.jnode.driver.block.BlockDeviceAPI;

/**
 * @author epr
 */
public class IDECDROMDriver extends Driver implements IDEDeviceAPI {

	/** The IDE device i'm driving */
	private IDEDevice device;

	/**
	 * @see org.jnode.driver.Driver#startDevice()
	 */
	protected void startDevice() {
		/* for now only register an API */
		device.registerAPI(BlockDeviceAPI.class, this);
	}

	/**
	 * @see org.jnode.driver.Driver#stopDevice()
	 */
	protected void stopDevice() {
		/* for now only unregister an API */
		device.unregisterAPI(BlockDeviceAPI.class);
	}

	/**
	 * @see org.jnode.driver.Driver#afterConnect(org.jnode.driver.Device)
	 */
	protected void afterConnect(Device device) {
		this.device = (IDEDevice)device;
		super.afterConnect(device);
	}

	/**
	 * @see org.jnode.driver.block.BlockDeviceAPI#flush()
	 */
	public void flush() throws IOException {
		throw new IOException("Not implemented yet");
	}

	/**
	 * @see org.jnode.driver.block.BlockDeviceAPI#getLength()
	 */
	public long getLength() throws IOException {
		throw new IOException("Not implemented yet");
	}

	/**
	 * @see org.jnode.driver.block.BlockDeviceAPI#read(long, byte[], int, int)
	 */
	public void read(long devOffset, byte[] dest, int destOffset, int length) throws IOException {
		throw new IOException("Not implemented yet");
	}

	/**
	 * @see org.jnode.driver.block.BlockDeviceAPI#write(long, byte[], int, int)
	 */
	public void write(long devOffset, byte[] src, int srcOffset, int length) throws IOException {
		throw new IOException("Not implemented yet");
	}

}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?