public class IndentedWriter extends Object implements Closeable
Constructor and Description |
---|
IndentedWriter()
Creates a new IndentedWriter object.
|
IndentedWriter(OutputStream output)
Creates a new IndentedWriter object.
|
IndentedWriter(Writer writer)
Creates a new IndentedWriter object.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the writer.
|
void |
flush()
Flushes the writer.
|
int |
getIndent()
Returns the indentation width.
|
void |
indent()
Increments the indentation level.
|
void |
print(String text)
Prints the given text.
|
void |
println()
Prints an empty line.
|
void |
println(String text)
Prints an indented line.
|
void |
setIndent(int indentWidth)
Changes the indentation width.
|
void |
startLine()
Indents to the beginning a new line.
|
void |
unindent()
Decrements the indentation level.
|
public IndentedWriter()
public IndentedWriter(OutputStream output)
public IndentedWriter(Writer writer)
public void println(String text)
public void println()
public void startLine()
public void print(String text)
public void indent()
public void unindent()
public void flush()
public void close()
close
in interface Closeable
close
in interface AutoCloseable
public void setIndent(int indentWidth)
public int getIndent()
Copyright © 2024 The Cornutum Project. All rights reserved.