public interface IWritableCharSequence extends CharSequence
Common interface for CharSequences that can be directly written to an output Writer
.
This will be used by a variety of implementations providing the capability to write text generated by the engine somehow directly to output (to the output writer, which will correspond to an HttpServletResponse#getWriter() writer in most web applications). This avoids the need to generate a large number of (possibly large) String object in memory before these values being output.
Modifier and Type | Method and Description |
---|---|
void |
write(Writer writer)
Write the contents of this char sequence directly to an output
Writer . |
charAt, chars, codePoints, length, subSequence, toString
void write(Writer writer) throws IOException
Write the contents of this char sequence directly to an output Writer
.
This method can avoid the need to create a String
object containing all the contents in
this character sequence just when we want to write it to a Writer
.
writer
- the writer to write the character sequence to.IOException
- if an input/output exception happens during writingCopyright © 2017 The THYMELEAF team. All rights reserved.