Class IndentWriter
- java.lang.Object
-
- java.io.Writer
-
- org.infinispan.protostream.annotations.impl.IndentWriter
-
- All Implemented Interfaces:
Closeable,Flushable,Appendable,AutoCloseable
public final class IndentWriter extends Writer
A Writer capable of appending Strings in a similar manner to StringWriter but with indentation capabilities to support more readable code generation. No IOExceptions are ever thrown. Closing has no effect.- Since:
- 3.0
- Author:
- anistor@redhat.com
-
-
Constructor Summary
Constructors Constructor Description IndentWriter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IndentWriterappend(char c)IndentWriterappend(CharSequence cs)IndentWriterappend(CharSequence cs, int start, int end)voidclose()IndentWriterdec()Decrease indentation.voidflush()IndentWriterinc()Increase indentation.StringtoString()voidwrite(char[] buf, int off, int len)voidwrite(int c)voidwrite(String s)voidwrite(String s, int off, int len)-
Methods inherited from class java.io.Writer
nullWriter, write
-
-
-
-
Method Detail
-
inc
public IndentWriter inc()
Increase indentation.
-
dec
public IndentWriter dec()
Decrease indentation.
-
append
public IndentWriter append(CharSequence cs)
- Specified by:
appendin interfaceAppendable- Overrides:
appendin classWriter
-
append
public IndentWriter append(CharSequence cs, int start, int end)
- Specified by:
appendin interfaceAppendable- Overrides:
appendin classWriter
-
append
public IndentWriter append(char c)
- Specified by:
appendin interfaceAppendable- Overrides:
appendin classWriter
-
flush
public void flush()
-
-