-
java的数据流
3.11 流
知道流的分类
掌握IO常用操作
Java中的流代表程序中数据的流通,是以先进先出方式发送信息的通道。
图3- 11 输入流和输出流
流可以分为不同的类型,按照不同的分类方式,从不同的角度来观察,概念上会有重叠。
按照流的方向,可以将流分为输入流和输出流:
输入流(InputStream):只能从中读取数据,而不能向其写入数据。
输出流(OutputStream):只能向其写入数据,而不能从中读取数据。
按照处理流的基本单位可以将流分为字节流和字符流:
字节流:在流中处理的基本单位为字节(8位的byte)的流。
字符流:在流中处理的基本单位为字符(16位的Unicode)的流。
按照流的角色分,可以将流分为节点流和过滤流:
节点流:可以从/向一个特定的IO设备(如磁盘或网络)读/写数据的流,节点流又常被称为低级流(Low Level Stream),节点通常是指文件、内存和管道。
过滤流:实现对一个已经存在的流的连接和封装,通过所封装的流的功能调用实现数据读/写功能的流。这种对流进行处理的流称为过滤流。
字节流中存放的是字节序列,无论是输入还是输出,都是直接对字节进行处理。InputStream和OutputStream为字节输入/输出流类的顶层父类。字符流中存放的是字符序列,无论是输入还是输出,都是直接对字符处理。字符流的顶层父类是Reader和Writer。节点流通常直接对特定的IO设备(如磁盘或网络)进行读写,而过滤流通常对已存在的流进行连接和封装,从而对已有的流进行特殊处理。
对象的序列化就是把对象写到一个输出流中,对象的反序列化是指从一个输入流中读取一个对象。
总结:
字节流:
输入流 输出流
FileInputStream FileOut
- 2022-01-25 23:22:03下载
- 积分:1
-
软件说明书 目录 1登陆 2客户服务 2
软件说明书 目录 1登陆 2客户服务 2-1入库操作 2-1-1补单操作 2-2派送通知 2-2-1补单操作 2-2-2新增客户 2-3提货通知 2-4到货查看 3仓库管理 3-3仓库入库 3-4仓库出库 4分拣操作 5调度管理 5-1提货调度 5-2派送调度 6签收操作 6-1入库签收 6-2派送歉收 7条码录入 8定单管理 9查询操作-software manuals Contents a landing two customer service 2-1 warehousing operation 2-1-1 fill-informed about the operation of 2-2-1 2-2 fill single new customer to operate 2-2-2 2-3 2-4 delivery notification arrived View three warehouse management 3-3 3-4 warehouse storage warehouse for four sorting out five operations on the management of delivery scheduling 5-1 5-2 6 signed for the delivery scheduling 6-1 warehousing operation signed for the delivery failures 7 6-2 barcode input management 9 8 orders investigation with operations
- 2022-09-17 20:00:03下载
- 积分:1
-
粒子生成程序,本程序实现了物理加速度和速度的运算。对游戏开发初学者应有所启发...
粒子生成程序,本程序实现了物理加速度和速度的运算。对游戏开发初学者应有所启发-Particle generation process, the procedures for the physical implementation of computing the acceleration and speed. Game development for beginners should be a source of inspiration
- 2022-03-06 06:28:30下载
- 积分:1
-
有关共享内存,生成dll函数库
有关共享内存,生成dll函数库-the shared memory, generate dll libraries
- 2023-07-19 08:05:03下载
- 积分:1
-
ACM中常用的算法思想与常用算法,是本人自己精心收集的,其中含清华ACM训练时候的笔迹,对ACM的人员是极佳的参考资料...
ACM中常用的算法思想与常用算法,是本人自己精心收集的,其中含清华ACM训练时候的笔迹,对ACM的人员是极佳的参考资料-ACM commonly used algorithm commonly used algorithms and thinking, is my own collection of carefully, with Tsinghua ACM training when the handwriting on the staff ACM is an excellent reference
- 2022-01-25 20:35:18下载
- 积分:1
-
file attributes file attributes
文件属性 -file attributes file attributes
- 2022-12-15 21:45:03下载
- 积分:1
-
osgi_orderapp是一个关于osgi入门的示例程序,根据osgi规范实现了一个订购系统...
osgi_orderapp是一个关于osgi入门的示例程序,根据osgi规范实现了一个订购系统-osgi_orderapp is an entry on the osgi example program implements a specification under osgi ordering system
- 2023-07-18 14:10:03下载
- 积分:1
-
on assembly language, the flower design of the audible procedures, primarily the...
基于汇编语言的电子琴设计中的发声程序,主要是利用计算机硬件发声-on assembly language, the flower design of the audible procedures, primarily the use of computer hardware audible! !
- 2022-02-26 22:35:10下载
- 积分:1
-
inverse kinematics genetic algorithms
逆运动学遗传算法matlab仿真
- 2022-08-17 05:00:20下载
- 积分:1
-
AJAX实现服务器端表单验证,struts2实现,给用户全新体验
AJAX实现服务器端表单验证,struts2实现,给用户全新体验-AJAX form validation server-side implementation, struts2 implementation, give the user a new experience
- 2022-09-24 01:35:04下载
- 积分:1