Package org.jf.util
Class IndentingWriter
- java.lang.Object
-
- java.io.Writer
-
- org.jf.util.IndentingWriter
-
- All Implemented Interfaces:
java.io.Closeable,java.io.Flushable,java.lang.Appendable,java.lang.AutoCloseable
public class IndentingWriter extends java.io.Writer
-
-
Field Summary
Fields Modifier and Type Field Description protected char[]bufferprotected intindentLevelprotected java.io.Writerwriter
-
Constructor Summary
Constructors Constructor Description IndentingWriter(java.io.Writer writer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.io.Writerappend(char c)java.io.Writerappend(java.lang.CharSequence charSequence)java.io.Writerappend(java.lang.CharSequence charSequence, int start, int len)voidclose()voiddeindent(int indentAmount)voidflush()voidindent(int indentAmount)voidwrite(char[] chars)voidwrite(char[] chars, int start, int len)voidwrite(int chr)voidwrite(java.lang.String s)voidwrite(java.lang.String str, int start, int len)protected voidwriteIndent()
-
-
-
Method Detail
-
writeIndent
protected void writeIndent() throws java.io.IOException- Throws:
java.io.IOException
-
write
public void write(int chr) throws java.io.IOException- Overrides:
writein classjava.io.Writer- Throws:
java.io.IOException
-
write
public void write(char[] chars) throws java.io.IOException- Overrides:
writein classjava.io.Writer- Throws:
java.io.IOException
-
write
public void write(char[] chars, int start, int len) throws java.io.IOException- Specified by:
writein classjava.io.Writer- Throws:
java.io.IOException
-
write
public void write(java.lang.String s) throws java.io.IOException- Overrides:
writein classjava.io.Writer- Throws:
java.io.IOException
-
write
public void write(java.lang.String str, int start, int len) throws java.io.IOException- Overrides:
writein classjava.io.Writer- Throws:
java.io.IOException
-
append
public java.io.Writer append(java.lang.CharSequence charSequence) throws java.io.IOException- Specified by:
appendin interfacejava.lang.Appendable- Overrides:
appendin classjava.io.Writer- Throws:
java.io.IOException
-
append
public java.io.Writer append(java.lang.CharSequence charSequence, int start, int len) throws java.io.IOException- Specified by:
appendin interfacejava.lang.Appendable- Overrides:
appendin classjava.io.Writer- Throws:
java.io.IOException
-
append
public java.io.Writer append(char c) throws java.io.IOException- Specified by:
appendin interfacejava.lang.Appendable- Overrides:
appendin classjava.io.Writer- Throws:
java.io.IOException
-
flush
public void flush() throws java.io.IOException- Specified by:
flushin interfacejava.io.Flushable- Specified by:
flushin classjava.io.Writer- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Specified by:
closein classjava.io.Writer- Throws:
java.io.IOException
-
indent
public void indent(int indentAmount)
-
deindent
public void deindent(int indentAmount)
-
-