|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.io.Writer
org.codehaus.groovy.runtime.StringBufferWriter
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.
| Field Summary |
| Fields inherited from class java.io.Writer |
lock |
| 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(char[] text,
int offset,
int length)
Write a portion of an array of characters. |
void |
write(int c)
Write a single character. |
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 java.io.Writer |
write |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public StringBufferWriter(StringBuffer buffer)
| Method Detail |
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 writepublic 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 writepublic String toString()
public void flush()
public void close()
throws IOException
IOException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||