⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 key.java

📁 数据库实现的一个源码包
💻 JAVA
字号:
package neustore.base;

import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;

/**
 * Interface for the key part of a record.
 * @see Data
 * @author Tian Xia &lt;tianxia@ccs.neu.edu&gt;<br>Donghui Zhang &lt;donghui@ccs.neu.edu&gt;
 */
public interface Key extends Comparable {
	/**
	 * Creates a new copy of the object.
	 * @return  the new copy
	 */
	public abstract Object clone();
	/* 
	 * Returns the number of bytes the object occupy.
	 * @return  number of bytes
	 */
	public abstract int size();
	/**
	 * Returns the maximum number of bytes this type of object may occupy.
	 * It is used to support variable-length key.
	 * @return  maximum number of bytes
	 */
	public abstract int maxSize();
	/**
	 * Reads the object from an input stream.
	 * @param in   input stream
	 * @throws IOException
	 */
	public abstract void read(DataInputStream in) throws IOException ;
	/**
	 * Writes the object to an output stream.
	 * @param out   output stream
	 * @throws IOException
	 */
	public abstract void write(DataOutputStream out) throws IOException ;
}

⌨️ 快捷键说明

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