public final class FastStringWriter extends Writer
StringBuilder
提供快读的字符串写出,相比jdk的StringWriter非线程安全,速度更快。Constructor and Description |
---|
FastStringWriter()
构造
|
FastStringWriter(int initialSize)
构造
|
Modifier and Type | Method and Description |
---|---|
FastStringWriter |
append(char c) |
FastStringWriter |
append(CharSequence csq) |
FastStringWriter |
append(CharSequence csq,
int start,
int end) |
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) |
public FastStringWriter()
public FastStringWriter(int initialSize)
initialSize
- 初始容量public FastStringWriter append(char c)
append
in interface Appendable
append
in class Writer
public FastStringWriter append(CharSequence csq, int start, int end)
append
in interface Appendable
append
in class Writer
public FastStringWriter append(CharSequence csq)
append
in interface Appendable
append
in class Writer
public void flush()
public void close()
Copyright © 2025. All rights reserved.