public class IndentingWriter
extends java.io.BufferedWriter
| Constructor and Description |
|---|
IndentingWriter(java.io.Writer out)
Create a new IndentingWriter that writes indented text to the
given Writer.
|
IndentingWriter(java.io.Writer out,
int step)
Create a new IndentingWriter that writes indented text to the
given Writer and uses the supplied indent step.
|
IndentingWriter(java.io.Writer out,
int step,
int tabSize)
Create a new IndentingWriter that writes indented text to the
given Writer and uses the supplied indent step and tab size.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkWrite()
Check if an indent needs to be written before writing the next
character.
|
protected void |
indentIn()
Increase the current indent by the indent step.
|
protected void |
indentOut()
Decrease the current indent by the indent step.
|
void |
newLine()
Write a line separator.
|
void |
p(java.lang.Object o)
Write Object.
|
void |
p(java.lang.String s)
Write string.
|
void |
pI()
Indent in.
|
void |
pln()
End current line.
|
void |
pln(java.lang.Object o)
Write Object; end current line.
|
void |
pln(java.lang.String s)
Write string; end current line.
|
void |
plnI(java.lang.Object o)
Write Object; end current line; indent in.
|
void |
plnI(java.lang.String s)
Write string; end current line; indent in.
|
void |
pO()
Indent out.
|
void |
pO(java.lang.Object o)
Indent out; write Object.
|
void |
pO(java.lang.String s)
Indent out; write string.
|
void |
pOln(java.lang.Object o)
Indent out; write Object; end current line.
|
void |
pOln(java.lang.String s)
Indent out; write string; end current line.
|
void |
pOlnI(java.lang.Object o)
Indent out; write Object; end current line; indent in.
|
void |
pOlnI(java.lang.String s)
Indent out; write string; end current line; indent in.
|
void |
write(char[] cbuf,
int off,
int len)
Write a portion of an array of characters.
|
void |
write(int c)
Write a single character.
|
void |
write(java.lang.String s,
int off,
int len)
Write a portion of a String.
|
public IndentingWriter(java.io.Writer out)
public IndentingWriter(java.io.Writer out,
int step)
public IndentingWriter(java.io.Writer out,
int step,
int tabSize)
public void write(int c)
throws java.io.IOException
write in class java.io.BufferedWriterjava.io.IOExceptionpublic void write(char[] cbuf,
int off,
int len)
throws java.io.IOException
write in class java.io.BufferedWriterjava.io.IOExceptionpublic void write(java.lang.String s,
int off,
int len)
throws java.io.IOException
write in class java.io.BufferedWriterjava.io.IOExceptionpublic void newLine()
throws java.io.IOException
newLine in class java.io.BufferedWriterjava.io.IOExceptionprotected void checkWrite()
throws java.io.IOException
java.io.IOExceptionprotected void indentIn()
protected void indentOut()
public void pI()
public void pO()
public void p(java.lang.String s)
throws java.io.IOException
java.io.IOExceptionpublic void pln()
throws java.io.IOException
java.io.IOExceptionpublic void pln(java.lang.String s)
throws java.io.IOException
java.io.IOExceptionpublic void plnI(java.lang.String s)
throws java.io.IOException
java.io.IOExceptionpublic void pO(java.lang.String s)
throws java.io.IOException
java.io.IOExceptionpublic void pOln(java.lang.String s)
throws java.io.IOException
java.io.IOExceptionpublic void pOlnI(java.lang.String s)
throws java.io.IOException
java.io.IOExceptionpublic void p(java.lang.Object o)
throws java.io.IOException
java.io.IOExceptionpublic void pln(java.lang.Object o)
throws java.io.IOException
java.io.IOExceptionpublic void plnI(java.lang.Object o)
throws java.io.IOException
java.io.IOExceptionpublic void pO(java.lang.Object o)
throws java.io.IOException
java.io.IOExceptionpublic void pOln(java.lang.Object o)
throws java.io.IOException
java.io.IOExceptionpublic void pOlnI(java.lang.Object o)
throws java.io.IOException
java.io.IOExceptionCopyright © 2017. All Rights Reserved.