|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.Writer
org.jfree.report.util.MemoryStringWriter
public class MemoryStringWriter
A string writer that is able to write large amounts of data. The original StringWriter contained in Java doubles its buffersize everytime the buffer overflows. This is nice with small amounts of data, but awfull for huge buffers.
Field Summary |
---|
Fields inherited from class java.io.Writer |
---|
lock |
Constructor Summary | |
---|---|
MemoryStringWriter()
Create a new character-stream writer whose critical sections will synchronize on the writer itself. |
|
MemoryStringWriter(int bufferSize)
Create a new character-stream writer whose critical sections will synchronize on the writer itself. |
Method Summary | |
---|---|
void |
close()
Close the stream, flushing it first. |
void |
flush()
Flush the stream. |
java.lang.String |
toString()
|
void |
write(char[] cbuf,
int off,
int len)
Write a portion of an array of characters. |
Methods inherited from class java.io.Writer |
---|
append, append, append, write, write, write, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MemoryStringWriter()
public MemoryStringWriter(int bufferSize)
Method Detail |
---|
public void write(char[] cbuf, int off, int len) throws java.io.IOException
write
in class java.io.Writer
cbuf
- Array of charactersoff
- Offset from which to start writing characterslen
- Number of characters to write
java.io.IOException
- If an I/O error occurspublic void flush() throws java.io.IOException
flush
in interface java.io.Flushable
flush
in class java.io.Writer
java.io.IOException
- If an I/O error occurspublic void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in class java.io.Writer
java.io.IOException
- If an I/O error occurspublic java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |