您现在的位置是: 首页 > CET6单词 >

CET6单词

flush是什么意思_flush用法_flush怎么读_flush翻译_flush含义

2025-06-09 17:47:45 阅读:0

flush是什么意思_flush用法_flush怎么读_flush翻译_flush含义

flush是什么意思

  flush()意思是把缓冲区的内容强制的写出。 因为操作系统的某些机制,为了防止一直不停地磁盘读写,所以有了延迟写入的概念,(注意不要和frush()刷新混淆了)

主要用在IO中,即清空缓冲区数据,一般在读写流(stream)的时候,数据是先被读到了内存中,再把数据写到文件中,当你数据读完的时候不代表你的数据已经写完了,因为还有一部分有可能会留在内存这个缓冲区中。这时候如果你调用了close()方法关闭了读写流,那么这部分数据就会丢失,所以应该在关闭读写流之前先flush()。。

  在网络web服务器上也是,为了防止写一个字节就发送一个消息,所以有缓冲区的概念,比如64K的内存区域,缓冲区写满了再一次性写入磁盘之中(或者发送给客户端浏览器)。

flush方法一般是程序写入完成时执行。随后跟着close方法。例如:

// 取得输出流。当然,看具体环境。

PrintWriter out = Util.getWriter();

out.println("输出一些信息,可能很多");

out.flush();

out.close();

flush名词例句

脸红;发红;冲(抽水马桶);(用水)冲洗净,冲洗

n.

潮红;脸红;一阵强烈情感;(流露出的)一阵激情;冲(抽水马桶)

adj.

富有,很有钱(通常为短期的);完全齐平

adv.

齐平地;直接地

She flushed to the ears.

她脸红到耳根。

2.

He was flushed with success after his first novel was published.

他的第一部小说发表以后,他志得意满。

3.

Flush the pipe out with clean water.

用净水冲洗管子。

4.

Drinking lots of water will help to flush toxins out of the body.

大量饮水有助于清除体内毒素。

5.

Flush clean water through the pipe.

用净水冲洗管子。

6.

Make sure the paving stones are flush with the lawn.

务必要使铺路石和草坪齐平。

She flushed the dirty floor with a high-pressure water gun.她用高压水枪冲洗着脏地面。

The little girl flushed because of shyness.这个小女孩因为害羞而脸红了。

He felt a twinge of flush after he stood on the platform.他站上讲台之后感到一阵脸红。

The editor told me that each line should be flushwith the right-hand.编辑告诉我文章每一行都应与右边距对齐。

These types of plants flush in different seasons.这几种植物发新芽的季节不同。

He pressed the flush with his hand.他用手按下了冲水按钮