|
Copyright 2002 by aragost | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.io.Writer
|
+--java.io.PrintWriter
|
+--com.aragost.io.IndentableWriter
PrintWriter| Field Summary | |
static java.lang.String |
DEFAULT_INDENTION_STRING
|
| Fields inherited from class java.io.PrintWriter |
out |
| Fields inherited from class java.io.Writer |
lock |
| Constructor Summary | |
IndentableWriter(java.io.OutputStream out)
Create a new IndentableWriter, without automatic line flushing, from an existing OutputStream. |
|
IndentableWriter(java.io.OutputStream out,
boolean autoFlush)
Create a new IndentableWriter from an existing OutputStream. |
|
IndentableWriter(java.io.Writer out)
Create a new IndentableWriter |
|
IndentableWriter(java.io.Writer out,
boolean autoFlush)
Create a new IndentableWriter. |
|
| Method Summary | |
void |
doIndent()
Write indention. |
void |
dontIndent()
Don't write indention until doIndent() is called. |
java.lang.String |
getIndentionString()
Getter for property indentionString. |
void |
indent()
Increase the indention |
void |
outdent()
Decrease the indention level |
void |
println()
|
void |
setIndentionString(java.lang.String indentionString)
Setter for property indentionString. |
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. |
| Methods inherited from class java.io.PrintWriter |
checkError, close, flush, print, print, print, print, print, print, print, print, print, println, println, println, println, println, println, println, println, println, setError, write, write |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String DEFAULT_INDENTION_STRING
| Constructor Detail |
public IndentableWriter(java.io.Writer out)
public IndentableWriter(java.io.Writer out,
boolean autoFlush)
out - A WriterautoFlush - A boolean; if true, the println() methods will flush
the output bufferpublic IndentableWriter(java.io.OutputStream out)
out - An output streamOutputStreamWriter.OutputStreamWriter(java.io.OutputStream)
public IndentableWriter(java.io.OutputStream out,
boolean autoFlush)
out - An output streamautoFlush - A boolean; if true, the println() methods will flush
the output bufferOutputStreamWriter.OutputStreamWriter(java.io.OutputStream)| Method Detail |
public void write(int c)
write in class java.io.PrintWriterc - The character to write
public void write(char[] cbuf,
int off,
int len)
write in class java.io.PrintWritercbuf - Array of charactersoff - Offset from which to start writing characterslen - Number of characters to write
public void write(java.lang.String s,
int off,
int len)
write in class java.io.PrintWriters - Stringoff - Offset from which to start writing characterslen - Number of characters to writepublic void println()
println in class java.io.PrintWriterpublic void indent()
public void outdent()
public void dontIndent()
doIndent() is called.
This is useful if you want to print a literal String spanning
multiple lines.
public void doIndent()
public java.lang.String getIndentionString()
public void setIndentionString(java.lang.String indentionString)
indentionString - New value of property indentionString.
|
Copyright 2002 by aragost | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||