|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--openjava.tools.WriterStack
Wrapper class of class Stack to specialize into Writer.
Field Summary | |
private static PrintWriter |
defaultWriter
|
private Stack |
stack
|
Constructor Summary | |
WriterStack()
Constructs this stack with an element(standard output). |
|
WriterStack(OutputStream out)
Constructs this stack with the specified output stream. |
|
WriterStack(PrintWriter writer)
Constructs this stack with the specified print writer. |
|
WriterStack(Writer writer)
Constructs this stack with the specified writer. |
Method Summary | |
boolean |
empty()
Tests if this stack is empty. |
PrintWriter |
peek()
Looks at the print writer at the top of this stack without removing it from the stack. |
PrintWriter |
pop()
Removes the print writer at the top of this stack and returns that print writer as the value of this function. |
void |
push(OutputStream ostream)
Pushes a print writer from the specified print stream onto the top of this stack. |
void |
push(PrintWriter writer)
Pushes a print writer onto the top of this stack. |
void |
push(Writer writer)
Pushes a print writer onto the top of this stack. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private Stack stack
private static PrintWriter defaultWriter
Constructor Detail |
public WriterStack()
public WriterStack(PrintWriter writer)
public WriterStack(Writer writer)
public WriterStack(OutputStream out)
Method Detail |
public PrintWriter peek()
public PrintWriter pop()
public void push(PrintWriter writer)
writer
- the print writer to be pushed onto this stack.
public void push(Writer writer)
writer
- the writer to be pushed onto this stack.
public void push(OutputStream ostream)
ostream
- the output stream to be pushed onto this stack.
public boolean empty()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |