Java I/O 流;有什么区别? [英] Java I/O streams; what are the differences?

查看:26
本文介绍了Java I/O 流;有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

java.io 有许多不同的I/O流,(FileInputStream、FileOutputStream、FileReader、FileWriter、BufferedStreams...等),我在确定它们之间的差异时感到困惑.有哪些流类型优于另一种流类型的示例,它们之间的真正区别是什么?

java.io has many different I/O streams, (FileInputStream, FileOutputStream, FileReader, FileWriter, BufferedStreams... etc.) and I am confused in determining the differences between them. What are some examples where one stream type is preferred over another, and what are the real differences between them?

推荐答案

这是个大话题!我建议您首先阅读 I/O 流:

This is a big topic! I would recommend that you begin by reading I/O Streams:

一个 I/O 流代表一个输入源或输出目标.一个流可以代表许多不同的各种来源和目的地,包括磁盘文件、设备、其他程序和内存数组.

An I/O Stream represents an input source or an output destination. A stream can represent many different kinds of sources and destinations, including disk files, devices, other programs, and memory arrays.

流支持多种不同的类型数据,包括简单的字节,原始数据类型,本地化字符和对象.一些流简单地传递数据;别人操纵并以有用的方式转换数据.

Streams support many different kinds of data, including simple bytes, primitive data types, localized characters, and objects. Some streams simply pass on data; others manipulate and transform the data in useful ways.

这篇关于Java I/O 流;有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆