Package org.thymeleaf.util
Class FastStringWriter
- Object
-
- java.io.Writer
-
- org.thymeleaf.util.FastStringWriter
-
- All Implemented Interfaces:
Closeable
,Flushable
,Appendable
,AutoCloseable
public final class FastStringWriter extends Writer
Fast implementation of
Writer
that avoids the need to use a thread-safeStringBuffer
.- Since:
- 3.0.0
- Author:
- Daniel Fernández
-
-
Constructor Summary
Constructors Constructor Description FastStringWriter()
FastStringWriter(int initialSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
flush()
String
toString()
void
write(char[] cbuf)
void
write(char[] cbuf, int off, int len)
void
write(int c)
void
write(String str)
void
write(String str, int off, int len)
-
Methods inherited from class java.io.Writer
append, append, append, nullWriter
-
-
-
-
Method Detail
-
flush
public void flush() throws IOException
- Specified by:
flush
in interfaceFlushable
- Specified by:
flush
in classWriter
- Throws:
IOException
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in classWriter
- Throws:
IOException
-
-