📄 key.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 <tianxia@ccs.neu.edu><br>Donghui Zhang <donghui@ccs.neu.edu>
*/
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 + -