|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.io.Writer | +--java.io.FilterWriter | +--org.erights.e.elib.oldeio.TextWriter
Safe:
Field Summary | |
private static String |
DEFAULT_PREFIX
|
private boolean |
myAutoflush
|
private boolean |
myCloses
|
private FlexMap |
myContext
|
private String |
myNewline
|
Fields inherited from class java.io.FilterWriter |
out |
Fields inherited from class java.io.Writer |
lock |
Constructor Summary | |
TextWriter(Writer out)
Enabled: Initial newline defaults to "\n". |
|
TextWriter(Writer out,
boolean autoflush)
Enabled: Initial newline defaults to "\n". |
|
TextWriter(Writer out,
String newline,
boolean autoflush,
boolean closes,
FlexMap optContext)
Enabled: Returns a writer that wraps 'out', and writes all strings with "\n" replaced with the 'newline' string. |
Method Summary | |
void |
__printOn(TextWriter out)
Enabled: A TextWriter prints itself on a TextWriter as <TextWriter>. |
void |
close()
Enabled: XXX Does NOT close the underlying stream, since that might be separately accessed. |
TextWriter |
indent()
Enabled: morePrefix defaults to four spaces |
TextWriter |
indent(String morePrefix)
Enabled: Returns a new TextWriter just like this one, but with morePrefix added on. |
void |
lnPrint(Object obj)
Enabled: Like println(), but does the newline & prefix first |
static Object[] |
makeBufferingPair()
Enabled: Returns a pair of a TextWriter and the StringBuffer it writes into. |
void |
print(Object original)
Enabled: Like PrintWriter.print(), but doesn't suppress IOExceptions |
void |
print(Object a,
Object b)
Enabled: |
void |
print(Object a,
Object b,
Object c)
Enabled: |
void |
print(Object a,
Object b,
Object c,
Object d)
Enabled: |
void |
print(Object a,
Object b,
Object c,
Object d,
Object e)
Enabled: |
void |
print(Object a,
Object b,
Object c,
Object d,
Object e,
Object f)
Enabled: |
void |
print(Object a,
Object b,
Object c,
Object d,
Object e,
Object f,
Object g)
Enabled: |
void |
printAll(Object[] objs)
Enabled: |
void |
println()
Enabled: Like PrintWriter.println(), but uses our own newline, and doesn't suppress IOExceptions. |
void |
println(Object obj)
Enabled: Like PrintWriter.println(), but doesn't suppress IOExceptions |
void |
quote(Object original)
Enabled: quote(obj) differs from print(obj) in that the quoted form of the object is printed. |
void |
write(char[] cbuf,
int off,
int len)
Enabled: |
void |
write(int c)
Enabled: |
void |
write(String str,
int off,
int len)
Enabled: |
Methods inherited from class java.io.FilterWriter |
flush |
Methods inherited from class java.io.Writer |
write, write |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final String DEFAULT_PREFIX
private final String myNewline
private final boolean myAutoflush
private final boolean myCloses
private final FlexMap myContext
Constructor Detail |
public TextWriter(Writer out)
public TextWriter(Writer out, boolean autoflush)
public TextWriter(Writer out, String newline, boolean autoflush, boolean closes, FlexMap optContext)
If autoflush, flush()es after outputting each newline.
Method Detail |
public static Object[] makeBufferingPair()
public void close() throws IOException
close
in class FilterWriter
IOException
public TextWriter indent()
public TextWriter indent(String morePrefix)
public void print(Object original) throws IOException
IOException
public void quote(Object original) throws IOException
IOException
public void printAll(Object[] objs) throws IOException
IOException
public void print(Object a, Object b) throws IOException
IOException
public void print(Object a, Object b, Object c) throws IOException
IOException
public void print(Object a, Object b, Object c, Object d) throws IOException
IOException
public void print(Object a, Object b, Object c, Object d, Object e) throws IOException
IOException
public void print(Object a, Object b, Object c, Object d, Object e, Object f) throws IOException
IOException
public void print(Object a, Object b, Object c, Object d, Object e, Object f, Object g) throws IOException
IOException
public void lnPrint(Object obj) throws IOException
IOException
public void println() throws IOException
IOException
public void println(Object obj) throws IOException
IOException
public void write(char[] cbuf, int off, int len) throws IOException
write
in class FilterWriter
cbuf
- Buffer of characters to be writtenoff
- Offset from which to start reading characterslen
- Number of characters to be written
IOException
public void write(int c) throws IOException
write
in class FilterWriter
c
- int specifying a character to be written.
IOException
public void write(String str, int off, int len) throws IOException
write
in class FilterWriter
str
- String to be writtenoff
- Offset from which to start reading characterslen
- Number of characters to be written
IOException
public void __printOn(TextWriter out) throws IOException
IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |