All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class openjava.tools.WriterStack

java.lang.Object
   |
   +----openjava.tools.WriterStack

public class WriterStack
extends Object
Wrapper class of class Stack to specialize into Writer.


Constructor Index

 o WriterStack()
Constructs this stack with an element(standard output).
 o WriterStack(OutputStream)
Constructs this stack with the specified output stream.
 o WriterStack(PrintWriter)
Constructs this stack with the specified print writer.
 o WriterStack(Writer)
Constructs this stack with the specified writer.

Method Index

 o empty()
Tests if this stack is empty.
 o peek()
Looks at the print writer at the top of this stack without removing it from the stack.
 o pop()
Removes the print writer at the top of this stack and returns that print writer as the value of this function.
 o push(OutputStream)
Pushes a print writer from the specified print stream onto the top of this stack.
 o push(PrintWriter)
Pushes a print writer onto the top of this stack.
 o push(Writer)
Pushes a print writer onto the top of this stack.

Constructors

 o WriterStack
 public WriterStack()
Constructs this stack with an element(standard output).

 o WriterStack
 public WriterStack(PrintWriter writer)
Constructs this stack with the specified print writer.

 o WriterStack
 public WriterStack(Writer writer)
Constructs this stack with the specified writer.

 o WriterStack
 public WriterStack(OutputStream out)
Constructs this stack with the specified output stream.

Methods

 o peek
 public PrintWriter peek()
Looks at the print writer at the top of this stack without removing it from the stack.

Returns:
the print writer at the top of this stack.
 o pop
 public PrintWriter pop()
Removes the print writer at the top of this stack and returns that print writer as the value of this function.

Returns:
The object at the top of this stack.
 o push
 public void push(PrintWriter writer)
Pushes a print writer onto the top of this stack.

Parameters:
writer - the print writer to be pushed onto this stack.
Returns:
the item argument.
 o push
 public void push(Writer writer)
Pushes a print writer onto the top of this stack.

Parameters:
writer - the writer to be pushed onto this stack.
Returns:
the item argument.
 o push
 public void push(OutputStream ostream)
Pushes a print writer from the specified print stream onto the top of this stack.

Parameters:
ostream - the output stream to be pushed onto this stack.
Returns:
the item argument.
 o empty
 public boolean empty()
Tests if this stack is empty.

Returns:
true if this stack is empty; false otherwise.

All Packages  Class Hierarchy  This Package  Previous  Next  Index