|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
public interface ObjectInput
ObjectInput 扩展 DataInput 接口以包含对象的读操作。DataInput 包括基本类型的输入方法;ObjectInput 扩展了该接口,以包含对象、数组和 String 的输出方法。
InputStream,
ObjectOutputStream,
ObjectInputStream| 方法摘要 | |
|---|---|
int |
available()
返回可以无阻塞地读取的字节数。 |
void |
close()
关闭输入流。 |
int |
read()
读取数据字节。 |
int |
read(byte[] b)
读入 byte 数组。 |
int |
read(byte[] b,
int off,
int len)
读入 byte 数组。 |
Object |
readObject()
读取并返回对象。 |
long |
skip(long n)
跳过输入的 n 个字节。 |
| 从接口 java.io.DataInput 继承的方法 |
|---|
readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, skipBytes |
| 方法详细信息 |
|---|
Object readObject()
throws ClassNotFoundException,
IOException
ClassNotFoundException - 如果无法找到已序列化对象的类。
IOException - 如果发生任何常规 Input/Output 相关的异常。
int read()
throws IOException
IOException - 如果发生 I/O 错误。
int read(byte[] b)
throws IOException
b - 将数据读入的缓冲区
IOException - 如果发生 I/O 错误。
int read(byte[] b,
int off,
int len)
throws IOException
b - 将数据读入的缓冲区off - 数据的初始偏移量len - 读取的最大字节数
IOException - 如果发生 I/O 错误。
long skip(long n)
throws IOException
n - 要跳过的字节数
IOException - 如果发生 I/O 错误。
int available()
throws IOException
IOException - 如果发生 I/O 错误。
void close()
throws IOException
IOException - 如果发生 I/O 错误。
|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。另请参阅文档重新分发政策。