Package org.thymeleaf.util
Interface IWritableCharSequence
-
- All Superinterfaces:
java.lang.CharSequence
- All Known Implementing Classes:
AbstractLazyCharSequence,AggregateCharSequence,LazyEscapingCharSequence,LazyProcessingCharSequence
public interface IWritableCharSequence extends java.lang.CharSequenceCommon 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)Stringobject in memory before these values being output.- Since:
- 3.0.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidwrite(java.io.Writer writer)Write the contents of this char sequence directly to an outputWriter.
-
-
-
Method Detail
-
write
void write(java.io.Writer writer) throws java.io.IOExceptionWrite the contents of this char sequence directly to an output
Writer.This method can avoid the need to create a
Stringobject containing all the contents in this character sequence just when we want to write it to aWriter.- Parameters:
writer- the writer to write the character sequence to.- Throws:
java.io.IOException- if an input/output exception happens during writing
-
-