All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cn.micro.core.io.FastStringPrintWriter Maven / Gradle / Ivy

package cn.micro.core.io;


import java.io.PrintWriter;

/**
 * 快速的 PrintWriter,用来处理异常信息,转化为字符串
 *
 * 

* 1. 默认容量为 256 *

*/ public class FastStringPrintWriter extends PrintWriter { private final FastStringWriter writer; public FastStringPrintWriter() { this(256); } public FastStringPrintWriter(int initialSize) { super(new FastStringWriter(initialSize)); this.writer = (FastStringWriter) out; } /** * Throwable printStackTrace,只掉用了该方法 * * @param x Object */ @Override public void println(Object x) { writer.write(String.valueOf(x)); writer.write('\n'); } @Override public String toString() { return writer.toString(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy