java.lang.Object | |||
↳ | java.io.Writer | ||
↳ | java.io.BufferedWriter | ||
↳ | sun.rmi.rmic.newrmic.IndentingWriter |
A BufferedWriter that supports automatic indentation of lines of text written to the underlying Writer. Methods are provided for compact/convenient indenting in and out, writing text, and writing lines of text in various combinations. WARNING: The contents of this source file are not part of any supported API. Code that depends on them does so at its own risk: they are subject to change or removal without notice.
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.io.Writer
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates a new IndentingWriter that writes indented text to the
given Writer.
| |||||||||||
Creates a new IndentingWriter that writes indented text to the
given Writer and uses the supplied indent step.
| |||||||||||
Creates a new IndentingWriter that writes indented text to the
given Writer and uses the supplied indent step and tab size.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Writes a line separator.
| |||||||||||
Writes string.
| |||||||||||
Writes object.
| |||||||||||
Indents in.
| |||||||||||
Indents out.
| |||||||||||
Indents out; writes string.
| |||||||||||
Indents out; writes object.
| |||||||||||
Indents out; writes object; ends current line.
| |||||||||||
Indents out; writes string; ends current line.
| |||||||||||
Indents out; writes string; ends current line; indents in.
| |||||||||||
Indents out; writes object; ends current line; indents in.
| |||||||||||
Writes string; ends current line.
| |||||||||||
Ends current line.
| |||||||||||
Writes object; ends current line.
| |||||||||||
Writes object; ends current line; indents in.
| |||||||||||
Writes string; ends current line; indents in.
| |||||||||||
Writes a portion of an array of characters.
| |||||||||||
Writes a single character.
| |||||||||||
Writes a portion of a String.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Checks if an indent needs to be written before writing the next
character.
| |||||||||||
Increases the current indent by the indent step.
| |||||||||||
Decreases the current indent by the indent step.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.io.BufferedWriter
| |||||||||||
From class
java.io.Writer
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
java.io.Closeable
| |||||||||||
From interface
java.io.Flushable
| |||||||||||
From interface
java.lang.Appendable
|
Creates a new IndentingWriter that writes indented text to the given Writer. Use the default indent step of four spaces.
Creates a new IndentingWriter that writes indented text to the given Writer and uses the supplied indent step.
Creates a new IndentingWriter that writes indented text to the given Writer and uses the supplied indent step and tab size.
Writes a line separator. The next character written will be preceded by an indent.
IOException |
---|
Indents in.
Indents out.
Indents out; writes string; ends current line; indents in. This method is useful for generating lines of code that both end and begin nested blocks, like "} else {".
IOException |
---|
Indents out; writes object; ends current line; indents in. This method is useful for generating lines of code that both end and begin nested blocks, like "} else {".
IOException |
---|
Writes a portion of an array of characters.
cbuf | A character array |
---|---|
off | Offset from which to start reading characters |
len | Number of characters to write |
IOException |
---|
Writes a portion of a String.
s | String to be written |
---|---|
off | Offset from which to start reading characters |
len | Number of characters to be written |
IOException |
---|
Checks if an indent needs to be written before writing the next character. The indent generation is optimized (and made consistent with certain coding conventions) by condensing groups of eight spaces into tab characters.
IOException |
---|
Increases the current indent by the indent step.
Decreases the current indent by the indent step.