System.out是缓冲还是非缓冲? [英] Is System.out buffered or unbuffered?

查看:171
本文介绍了System.out是缓冲还是非缓冲?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

System.out 是缓冲还是非缓冲?

我读到这是<$ c $的对象c> InputStream 和 PrinterStream System.out 引用的对象类型。

I read this is an object of InputStream and PrinterStream is the type of object referenced by System.out.

并且它们都是无缓冲的,所以为什么 println()刷新无缓冲...是否可以刷新无缓冲的我已经读过它们是立即写的。

And they Both are Unbuffered so Why println() flushes the unbuffered...is it possible to flush unbuffered and I have read they are written immediately.

推荐答案

System.out 是标准输出。在大多数操作系统上,终端io被缓冲,并支持分页。

System.out is the "standard" output. On most operating systems that terminal io is buffered, and paging is supported.

来自Javadoc,


标准输出流。此流已打开并准备接受输出数据。通常,该流对应于主机环境或用户指定的显示输出或另一输出目的地。

The "standard" output stream. This stream is already open and ready to accept output data. Typically this stream corresponds to display output or another output destination specified by the host environment or user.

这篇关于System.out是缓冲还是非缓冲?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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