ObjectInputStream
时间: 2024-03-06 11:37:51 浏览: 14
ObjectInputStream is a Java class that allows reading objects from an InputStream. It is used to deserialize objects that have been previously serialized using ObjectOutputStream.
ObjectInputStream provides various read methods to read objects of different types from an InputStream. It reads objects in the same order that they were written by ObjectOutputStream.
ObjectInputStream also provides methods to read primitive data types and arrays of primitive data types. It can also read objects that implement the Serializable or Externalizable interface.
ObjectInputStream is typically used in client-server applications where objects are transferred between the client and server over a network. It is also used in file handling to read objects from a file.