public interface ObjectInput extends DataInput, AutoCloseable
InputStream,
ObjectOutputStream,
ObjectInputStream
| Modifier and Type | Method and Description |
|---|---|
int |
available()
返回可以不阻塞读取的字节数。
|
void |
close()
关闭输入流。
|
int |
read()
读取一个字节的数据。
|
int |
read(byte[] b)
读入一个字节数组。
|
int |
read(byte[] b, int off, int len)
读入一个字节数组。
|
Object |
readObject()
读取和返回一个对象。
|
long |
skip(long n)
跳过n个输入字节。
|
readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, skipBytesObject readObject() throws ClassNotFoundException, IOException
ClassNotFoundException如果序列化对象的类不能找到。
IOException如果任何常见的输入/输出相关异常发生。
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
close 接口
AutoCloseable
IOException如果发生I/O错误。
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.