public interface Externalizable extends Serializable
ObjectOutputStream
, ObjectInputStream
, ObjectOutput
, ObjectInput
, Serializable
Modifier and Type | Method and Description |
---|---|
void |
readExternal(ObjectInput in)
该对象实现了readExternal方法来恢复其内容,方法是为对象,字符串和数组调用基本类型的DataInput方法和readObject。
|
void |
writeExternal(ObjectOutput out)
该对象实现了writeExternal方法来通过调用DataOutput的原始值或调用ObjectOutput的对象,字符串和数组的writeObject方法来保存其内容。
|
void writeExternal(ObjectOutput out) throws IOException
out
- 将对象写入的流
IOException
- 包括可能发生的任何I / O异常
void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
in
- 为了恢复对象,读取数据的流
IOException
- 如果发生I / O错误
ClassNotFoundException
- 如果无法找到正在还原的对象的类。
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.