UnsyncPrintWriter extends PrintWriter { @Override public PrintWriter append(char c) { write(c); return this; } UnsyncPrintWriter(File file);  UnsyncPrintWriter(File file, String csn);  UnsyncPrintWriter(OutputStream outputStream);  UnsyncPrintWriter(String fileName);  UnsyncPrintWriter(String fileName, String csn);  UnsyncPrintWriter(Writer writer); @Override PrintWriter append(char c); @Override PrintWriter append(CharSequence charSequence); @Override PrintWriter append(CharSequence charSequence, int start, int end); @Override boolean checkError(); @Override void close(); @Override void flush(); @Override PrintWriter format(
		Locale locale, String format, Object... arguments); @Override PrintWriter format(String format, Object... arguments); @Override void print(boolean b); @Override void print(char c); @Override void print(char[] chars); @Override void print(double d); @Override void print(float f); @Override void print(int i); @Override void print(long l); @Override void print(Object object); @Override void print(String string); @Override PrintWriter printf(
		Locale locale, String format, Object... arguments); @Override PrintWriter printf(String format, Object... arguments); @Override void println(); @Override void println(boolean b); @Override void println(char c); @Override void println(char[] chars); @Override void println(double d); @Override void println(float f); @Override void println(int i); @Override void println(long l); @Override void println(Object object); @Override void println(String string); void reset(Writer writer); @Override void write(char[] chars); @Override void write(char[] chars, int offset, int length); @Override void write(int c); @Override void write(String string); @Override void write(String string, int offset, int length);  }
@Test public void testAppend() throws Exception { StringWriter stringWriter = new StringWriter(); UnsyncPrintWriter unsyncPrintWriter = new UnsyncPrintWriter( stringWriter); unsyncPrintWriter.append('A'); Assert.assertEquals("A", stringWriter.toString()); unsyncPrintWriter.append(null); Assert.assertEquals("Anull", stringWriter.toString()); unsyncPrintWriter.append("B"); Assert.assertEquals("AnullB", stringWriter.toString()); unsyncPrintWriter.append(null, 0, 4); Assert.assertEquals("AnullBnull", stringWriter.toString()); unsyncPrintWriter.append("C", 0, 1); Assert.assertEquals("AnullBnullC", stringWriter.toString()); }