All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class sdsu.io.StringOutputStream

java.lang.Object
   |
   +----java.io.OutputStream
           |
           +----sdsu.io.StringOutputStream

public class StringOutputStream
extends OutputStream
An output stream that collects it output in a stringbuffer, which can be used to create a string.

Version:
1.0 28 November 1997
Author:
Roger Whitney (whitney@cs.sdsu.edu)
See Also:
StringWriter

Constructor Index

 o StringOutputStream()
Create a new StringOutputStream with the default initial buffer size.
 o StringOutputStream(int)
Create a new StringOutputStream with the specified initial buffer size.

Method Index

 o close()
Close the stream
 o flush()
Flush the stream
 o getBuffer()
Return the stringbuffer
 o toString()
Return the output as a String.
 o write(int)
Write a single character.

Constructors

 o StringOutputStream
 public StringOutputStream()
Create a new StringOutputStream with the default initial buffer size.

 o StringOutputStream
 public StringOutputStream(int initialBufferSize)
Create a new StringOutputStream with the specified initial buffer size.

Methods

 o close
 public void close()
Close the stream

Overrides:
close in class OutputStream
 o flush
 public void flush()
Flush the stream

Overrides:
flush in class OutputStream
 o getBuffer
 public StringBuffer getBuffer()
Return the stringbuffer

 o toString
 public String toString()
Return the output as a String.

Overrides:
toString in class Object
 o write
 public void write(int outputChar)
Write a single character. Ignores end of file.

Overrides:
write in class OutputStream

All Packages  Class Hierarchy  This Package  Previous  Next  Index