Package org.jf.util
Class IndentingWriter
java.lang.Object
java.io.Writer
org.jf.util.IndentingWriter
- All Implemented Interfaces:
Closeable,Flushable,Appendable,AutoCloseable
- Direct Known Subclasses:
CommentingIndentingWriter
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionappend(char c) append(CharSequence charSequence) append(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) voidvoidprotected voidprivate voidwriteLine(char[] chars, int start, int len) Writes out a block of text that contains no newlinesprivate voidWrites out a block of text that contains no newlinesMethods inherited from class java.io.Writer
nullWriter
-
Field Details
-
writer
-
buffer
protected final char[] buffer -
indentLevel
protected int indentLevel -
beginningOfLine
private boolean beginningOfLine -
newLine
-
-
Constructor Details
-
IndentingWriter
-
-
Method Details
-
writeIndent
- Throws:
IOException
-
write
- Overrides:
writein classWriter- Throws:
IOException
-
writeLine
Writes out a block of text that contains no newlines- Throws:
IOException
-
writeLine
Writes out a block of text that contains no newlines- Throws:
IOException
-
write
- Overrides:
writein classWriter- Throws:
IOException
-
write
- Specified by:
writein classWriter- Throws:
IOException
-
write
- Overrides:
writein classWriter- Throws:
IOException
-
write
- Overrides:
writein classWriter- Throws:
IOException
-
append
- Specified by:
appendin interfaceAppendable- Overrides:
appendin classWriter- Throws:
IOException
-
append
- Specified by:
appendin interfaceAppendable- Overrides:
appendin classWriter- Throws:
IOException
-
append
- Specified by:
appendin interfaceAppendable- Overrides:
appendin classWriter- Throws:
IOException
-
flush
- Specified by:
flushin interfaceFlushable- Specified by:
flushin classWriter- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classWriter- Throws:
IOException
-
indent
public void indent(int indentAmount) -
deindent
public void deindent(int indentAmount)
-