- 0
- 0
- 约1.14万字
- 约 41页
- 2018-02-26 发布于江苏
- 举报
【计算机】10 IO系统
第10章 IO系统 10.1 IO流简介 10.2 字节流 10.3 过滤流类 10.4 Reader及Writer 10.5 标准输入、输出 10.6 IO流的应用实例 第10章 IO系统(续) 10.7 随机文件访问 10.8 文件及目录管理 10.9 习题 10.1 IO流简介 通过流的概念,程序员可以把输入或输出的数据看作是一个字节数据流(或字符数据流等)。 通过流,程序可以从各种输入设备读入数据,向各种输出设备输出数据。 按照目的的不同,流可分为输入流和输出流。 10.2 字节流 字节输入流: InputStream是所有字节输入流的基类。 字节输出流: OutputStream是所有字节输出流类的基类。 10.2.1 InputStream public abstract int read() throws IOException public int read(byte[] b) throws IOException public long skip(long n) throws IOException public int available() throws IOException public void close() throws IOException 10.2.1 InputStream(续) ByteArrayInputStream FileInputStream PipedInputStream StringBufferInputStream SequenceInputStream FilterInputStream 10.2.2 OutputStream public abstract void write(int b) throws IOException public void write(byte[] b) throws IOException public void flush() throws IOException public void close() throws IOException 10.2.2 OutputStream(续) ByteArrayOutputStream PipedOutputStream FileOutputStream FilterOutputStream 例10-1 文件输入输出 CopyFile CopyFile.java toFile.java 10.3 过滤流类 FilterInputStream DataInputStream BufferedInputStream LineNumberInputStream FilterOutputStream DataOutputStream BufferedOutputStream PrintStream 10.3.1 FilterInputStream DataInputStream: boolean readBoolean() throws IOException char readChar() throws IOException int readShort() throws IOException int readByte() throws IOException int readInt() throws IOException int readLong() throws IOException float readFloat() throws IOException double readDouble() throws IOException 10.3.2 FilterOutputStream DataOutputStream: void writeBoolean(boolean b) throws IOException void writeChar(char c) throws IOException void writeShort(short s) throws IOException void writeByte(byte b) throws IOException void writeInt(int i) throws IOException void writeLong(long l) throws IOException void writeFloat(float f) throws IOException void writeDouble(double d) throws IOException 10.3.2
您可能关注的文档
- 《大戴礼记》拾诂.doc
- 《平行线的判定-同位角、内错角、同旁内角》参考课件.ppt
- 《意外险和健康险》基础知识及销售实务(PPT 53页).ppt
- 《整合乡土资源引导农村幼儿教师.doc
- 《日语口笔译》课程整体教学设计.doc
- 《桂花雨》教学课例.doc
- 《水轮机检修》--高技.doc
- 【doc】团体健康险直付理赔服务模式初探.doc
- 【PPT】-中国人寿保险公司健康险话术专题(48页)-保险话术.ppt
- 【安邦】车险人伤理赔实务手册.doc
- 广东省广州省实验中学教育集团2025-2026学年八年级上学期期中考试物理试题(解析版).docx
- 广东省广州大学附属中学2025-2026学年八年级上学期奥班期中物理试题(解析版).docx
- 广东省广州市第八十六中学2025-2026学年八年级上学期期中物理试题(含答案).docx
- 广东省广州市第八十九中学2025-2026学年八年级上学期期中考试物理试题(解析版).docx
- 广东省广州市第二中学2025-2026学年八年级上学期期中考试物理试题(含答案).docx
- 广东省广州市第八十六中学2025-2026学年八年级上学期期中物理试题(解析版).docx
- 广东省广州市第八十九中学2025-2026学年八年级上学期期中考试物理试题(含答案).docx
- 广东省广州市第二中学2025-2026学年八年级上学期期中考试物理试题(解析版).docx
- 2026《中国人寿上海分公司营销员培训体系优化研究》18000字.docx
- 《生物探究性实验教学》中小学教师资格模拟试题.docx
原创力文档

文档评论(0)