Serializable
DataFlavor
, MLet
, PrivateMLet
public interface Externalizable extends Serializable
Modifier and Type | Method | Description |
---|---|---|
void |
readExternal |
The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays. |
void |
writeExternal |
The object implements the writeExternal method to save its contents by calling the methods of DataOutput for its primitive values or calling the writeObject method of ObjectOutput for objects, strings, and arrays. |
void writeExternal(ObjectOutput out) throws IOException
out
- the stream to write the object toIOException
- Includes any I/O exceptions that may occurvoid readExternal(ObjectInput in) throws IOException, ClassNotFoundException
in
- the stream to read data from in order to restore the objectIOException
- if I/O errors occurClassNotFoundException
- If the class for an object being restored cannot be found.
© 1993, 2023, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/io/Externalizable.html