|
||||||||||
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 frysk.util.WordWrapWriter
public class WordWrapWriter
This class is a PrintWriter which word-wraps the output. It provides settings which control over the number of columns and indentation of wrapped lines.
Constructor Summary | |
---|---|
WordWrapWriter(Writer outStream)
Create a new WordWrapWriter using the defaults. |
|
WordWrapWriter(Writer outStream,
int columns)
Create a new WordWrapWriter, specifying just the number of columns. |
|
WordWrapWriter(Writer outStream,
int columns,
int wrapIndent,
Locale locale)
Create a new WordWrapWriter, specifying all parameters. |
Method Summary | |
---|---|
void |
setColumns(int columns)
Set the number of columns of output. |
void |
setWrapIndent(int wrapIndent)
Set the amount of indentation after wrapping. |
void |
setWrapIndentFromColumn()
Like setWrapIndent(int), but sets the indentation column based on the current column known to this writer. |
void |
write(char[] buf,
int offset,
int len)
|
void |
write(int b)
|
void |
write(String str,
int offset,
int len)
|
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, println, write, write |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WordWrapWriter(Writer outStream, int columns, int wrapIndent, Locale locale)
outStream
- the output writer to wrapcolumns
- the number of columns to allow before wrappingwrapIndent
- the number of columns to indent after wrappinglocale
- the locale to use for determining word breakspublic WordWrapWriter(Writer outStream, int columns)
outStream
- the output writer to wrapcolumns
- the number of columns to allow before wrappingpublic WordWrapWriter(Writer outStream)
outStream
- the output writer to wrapMethod Detail |
---|
public void setColumns(int columns)
columns
- the number of columns to allow before wrappingpublic void setWrapIndent(int wrapIndent)
wrapIndent
- the number of columns to indent after wrappingpublic void setWrapIndentFromColumn()
public void write(char[] buf, int offset, int len)
write
in class PrintWriter
public void write(int b)
write
in class PrintWriter
public void write(String str, int offset, int len)
write
in class PrintWriter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |