21 - 5.10 5.6 ObjectInputstream ObjectOutputStream writeObject(Object obj obj readObject 1 ObjectInputstream(lnputStream in

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
{ 1 上节知识要点 { 使用字符流读写文件。 { 回压字符流的基本方法。 { 数据流的基本概念和用法。 5.10 5.6 对象流 { ObjectInputstream 类和 ObjectOutputStream 类分别是 lnputStream 类和 Outputstream 类的子 类。它们创建的对象分别被称为对象输入 流和对象输出流。 { 对象输出流使用 writeObject(Object obj) 方法将一个对象 obj 写入到一个文件.对 象输入流使用 readObject() 方法读取一个 对象到程序中。
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
{ 2 构造方法 { ObjectInputstream(lnputStream in) { ObjectOutputStream(Outputstream out) 应用方法 { ObjectOutputStream 类的指向应当是一 个输出流对象,因此当准备将一个对象写 入文件中时.首先用 FileOutputstream 类创建一个文件输出流。 { ObjectInputStream 类的指向应当是一 个输入流对象,因此当准备从文件中读入 一个对象到程序中时.首先用 FileInputstream 类创建一个文件输入流。 Hashtable 类的常用方法 { public Hashtable()
Background image of page 2
Background image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 11/25/2011 for the course CS NetworkPro taught by Professor Xiaohuawang during the Summer '09 term at Tsinghua University.

Page1 / 3

21 - 5.10 5.6 ObjectInputstream ObjectOutputStream writeObject(Object obj obj readObject 1 ObjectInputstream(lnputStream in

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online