IndentedWriter extends AWriterBase implements AWriter, Closeable { @Override public void print(String str) { if ( str == null ) str = "null" ; if ( false ) { write$(str) ; return ; } for ( int i = 0 ; i < str.length() ; i++ ) printOneChar(str.charAt(i)) ; } IndentedWriter(OutputStream outStream);  IndentedWriter(OutputStream outStream, boolean withLineNumbers); protected  IndentedWriter(Writer writer); protected  IndentedWriter(Writer writer, boolean withLineNumbers); static IndentedWriter clone(IndentedWriter other); @Override void print(String str); @Override void printf(String formatStr, Object... args); @Override void print(char ch); void print(Object obj); @Override void println(String str); void println(char ch); void println(Object obj); @Override void println(); @Override void print(char[] cbuf); void print(String s, int n); void print(char ch, int n); void newline(); void ensureStartOfLine(); @Override void close(); @Override void flush(); void pad(); void pad(int col); void pad(int col, boolean absoluteColumn); int getRow(); int getCol(); int getAbsoluteIndent(); void setAbsoluteIndent(int x); int getCurrentOffset(); boolean hasLineNumbers(); void setLineNumbers(boolean lineNumbers); String getEndOfLineMarker(); void setEndOfLineMarker(String marker); boolean inFlatMode(); void setFlatMode(boolean flatMode); boolean getFlushOnNewline(); void setFlushOnNewline(boolean flushOnNewline); char getPadChar(); void setPadChar(char ch); String getPadString(); void setPadString(String str); String getLinePrefix(); void setLinePrefix(String str); void incIndent(); void incIndent(int x); void decIndent(); void decIndent(int x); void setUnitIndent(int x); int getUnitIndent(); boolean atLineStart(); int getNumberWidth(); void setNumberWidth(int widthOfNumbers); @Override String toString(); static final IndentedWriter stdout; static final IndentedWriter stderr; }
@Test public void write01() { try (IndentedLineBuffer b = new IndentedLineBuffer()) { b.print("hell") ; b.print("o") ; assertEquals("hello", b.asString()) ; } }