flush

Page Contents

Synopsis

<#flush>

Description

When FreeMarker generates the output it typically stockpiles the generated output and send it to the client in one or in a few big pieces. This act of sending is called flushing (as flushing the toilet). Although flushing happens automatically, sometimes you want to force it on certain points of the template processing, and this is what flush directive does. If it is needed, then the programmer could tell it to you; typically you should not use this directive. The mechanism of automatic flushing and the precise effect of flush directive are under the control of the programmer.

Flush simply calls the flush method of the currently used java.io.Writer instance. The whole buffering and flushing mechanism is implemented in the writer (what you have passed as the parameter of the Template.process method); FreeMarker does not deal with it.

FreeMarker Manual -- For FreeMarker 2.3.20
HTML generated: 2013-06-27 20:54:33 GMT
Edited with XMLMind XML Editor
Here!