org.mortbay.util
Class StringBufferWriter

java.lang.Object
  extended by java.io.Writer
      extended by org.mortbay.util.StringBufferWriter
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable, java.lang.Appendable

public class StringBufferWriter
extends java.io.Writer

A Writer to a StringBuffer.

Version:
$Id: StringBufferWriter.java,v 1.4 2004/05/09 20:33:04 gregwilkins Exp $
Author:
Greg Wilkins (gregw)

Field Summary
 
Fields inherited from class java.io.Writer
lock
 
Constructor Summary
StringBufferWriter()
          Constructor.
StringBufferWriter(java.lang.StringBuffer buffer)
          Constructor.
 
Method Summary
 void close()
           
 void flush()
           
 java.lang.StringBuffer getStringBuffer()
           
 void reset()
           
 void setStringBuffer(java.lang.StringBuffer buffer)
           
 void write(char c)
           
 void write(char[] ca)
           
 void write(char[] ca, int offset, int length)
           
 void write(java.lang.String s)
           
 void write(java.lang.String s, int offset, int length)
           
 
Methods inherited from class java.io.Writer
append, append, append, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringBufferWriter

public StringBufferWriter()
Constructor.


StringBufferWriter

public StringBufferWriter(java.lang.StringBuffer buffer)
Constructor.

Parameters:
buffer -
Method Detail

setStringBuffer

public void setStringBuffer(java.lang.StringBuffer buffer)

getStringBuffer

public java.lang.StringBuffer getStringBuffer()

write

public void write(char c)
           throws java.io.IOException
Throws:
java.io.IOException

write

public void write(char[] ca)
           throws java.io.IOException
Overrides:
write in class java.io.Writer
Throws:
java.io.IOException

write

public void write(char[] ca,
                  int offset,
                  int length)
           throws java.io.IOException
Specified by:
write in class java.io.Writer
Throws:
java.io.IOException

write

public void write(java.lang.String s)
           throws java.io.IOException
Overrides:
write in class java.io.Writer
Throws:
java.io.IOException

write

public void write(java.lang.String s,
                  int offset,
                  int length)
           throws java.io.IOException
Overrides:
write in class java.io.Writer
Throws:
java.io.IOException

flush

public void flush()
Specified by:
flush in interface java.io.Flushable
Specified by:
flush in class java.io.Writer

reset

public void reset()

close

public void close()
Specified by:
close in interface java.io.Closeable
Specified by:
close in class java.io.Writer


Copyright © 2004 Mortbay Consulting Pty. Ltd. All Rights Reserved.