Package org.apache.wicket.util.io
Class StringBufferWriter
- java.lang.Object
-
- java.io.Writer
-
- org.apache.wicket.util.io.StringBufferWriter
-
- All Implemented Interfaces:
Closeable
,Flushable
,Appendable
,AutoCloseable
public class StringBufferWriter extends Writer
- Author:
- jcompagner
-
-
Constructor Summary
Constructors Constructor Description StringBufferWriter()
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
flush()
AppendingStringBuffer
getStringBuffer()
void
reset()
resets the buffer.void
setStringBuffer(AppendingStringBuffer buffer)
void
write(char ch)
Writers the char to the buffervoid
write(char[] charArray)
void
write(char[] charArray, int offset, int length)
void
write(String string)
void
write(String string, int offset, int length)
-
-
-
Constructor Detail
-
StringBufferWriter
public StringBufferWriter()
Constructor
-
-
Method Detail
-
getStringBuffer
public AppendingStringBuffer getStringBuffer()
- Returns:
- The AppendingStringBuffer with the written data
-
setStringBuffer
public void setStringBuffer(AppendingStringBuffer buffer)
- Parameters:
buffer
-
-
write
public void write(char ch)
Writers the char to the buffer- Parameters:
ch
-
-
write
public void write(char[] charArray)
- Overrides:
write
in classWriter
- See Also:
Writer.write(char[])
-
write
public void write(char[] charArray, int offset, int length)
- Specified by:
write
in classWriter
- See Also:
Writer.write(char[], int, int)
-
write
public void write(String string)
- Overrides:
write
in classWriter
- See Also:
Writer.write(java.lang.String)
-
write
public void write(String string, int offset, int length)
- Overrides:
write
in classWriter
- See Also:
Writer.write(java.lang.String, int, int)
-
flush
public void flush()
- Specified by:
flush
in interfaceFlushable
- Specified by:
flush
in classWriter
- See Also:
Writer.flush()
-
reset
public void reset()
resets the buffer.
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in classWriter
- See Also:
Writer.close()
-
-