|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.Writer
java.io.PrintWriter
com.tangosol.io.IndentingWriter
public class IndentingWriter
An IndentingWriter is used to indent line-based output to an underlying Writer.
Field Summary |
---|
Fields inherited from class java.io.PrintWriter |
---|
out |
Fields inherited from class java.io.Writer |
---|
lock |
Constructor Summary | |
---|---|
IndentingWriter(Writer writer,
int cSpaces)
Construct an IndentingWriter that indents a certain number of spaces. |
|
IndentingWriter(Writer writer,
String sIndent)
Construct an IndentingWriter that indents using an indention string. |
Method Summary | |
---|---|
void |
println()
Terminate the current line by writing the line separator string. |
void |
resume()
Resumes indentation. |
void |
suspend()
Suspends indentation. |
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(String str)
Write a string. |
void |
write(String str,
int off,
int len)
Write a portion of a string. |
Methods inherited from class java.io.PrintWriter |
---|
append, append, append, append, append, append, append, append, append, checkError, close, flush, format, format, print, print, print, print, print, print, print, print, print, printf, printf, println, println, println, println, println, println, println, println, println, setError, write |
Constructor Detail |
---|
public IndentingWriter(Writer writer, int cSpaces)
writer
- the underlying writer to write tocSpaces
- the number of spaces to indent each line withpublic IndentingWriter(Writer writer, String sIndent)
writer
- the underlying writer to write tosIndent
- the String value to indent each line withMethod Detail |
---|
public void write(int c)
Subclasses that intend to support efficient single-character output should override this method.
write
in class PrintWriter
c
- int specifying a character to be written.public void write(char[] cbuf, int off, int len)
write
in class PrintWriter
cbuf
- Array of charactersoff
- Offset from which to start writing characterslen
- Number of characters to writepublic void write(String str)
write
in class PrintWriter
str
- String to be writtenpublic void write(String str, int off, int len)
write
in class PrintWriter
str
- A Stringoff
- Offset from which to start writing characterslen
- Number of characters to writepublic void println()
line.separator
, and is not necessarily a single newline
character ('\n'
).
println
in class PrintWriter
public void suspend()
public void resume()
|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |