| 
Groovy 1.7.9 | |||||||
| FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjava.io.Writer
org.codehaus.groovy.runtime.StringBufferWriter
public class StringBufferWriter extends Writer
This class codes around a silly limiation of StringWriter which doesn't allow a StringBuffer to be passed in as a constructor for some bizzare reason. So we replicate the behaviour of StringWriter here but allow a StringBuffer to be passed in.
| Constructor Summary | |
            StringBufferWriter(StringBuffer buffer)
            Create a new string writer which will append the text to the given StringBuffer  | 
        |
| Method Summary | |
|---|---|
            void
         | 
        
            close()
            Closing a StringWriter has no effect.  | 
        
            void
         | 
        
            flush()
            Flush the stream.  | 
        
            String
         | 
        
            toString()
            Return the buffer's current value as a string.  | 
        
            void
         | 
        
            write(int c)
            Write a single character.  | 
        
            void
         | 
        
            write(char[] text, int offset, int length)
            Write a portion of an array of characters.  | 
        
            void
         | 
        
            write(String text)
            Write a string.  | 
        
            void
         | 
        
            write(String text, int offset, int length)
            Write a portion of a string.  | 
        
| Methods inherited from class Writer | |
|---|---|
| append, append, append, append, append, append, write, write, write, write, write, close, flush, wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll | 
| Methods inherited from class Object | |
|---|---|
| wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll | 
| Constructor Detail | 
|---|
public StringBufferWriter(StringBuffer buffer)
| Method Detail | 
|---|
public void close()
public void flush()
public String toString()
public void write(int c)
public void write(char[] text, int offset, int length)
text -  Array of charactersoffset -  Offset from which to start writing characterslength -  Number of characters to write
public void write(String text)
public void write(String text, int offset, int length)
text -  the text to be writtenoffset -  offset from which to start writing characterslength -  Number of characters to write
Copyright © 2003-2010 The Codehaus. All rights reserved.