|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.io.Writer org.pentaho.reporting.engine.classic.core.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.
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. |
|
MemoryStringWriter(int bufferSize,
int maximumBufferIncrement)
|
Method Summary | |
---|---|
void |
close()
Close the stream, flushing it first. |
MemoryStringReader |
createReader()
|
void |
flush()
Flush the stream. |
int |
getCursor()
|
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 |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MemoryStringWriter()
public MemoryStringWriter(int bufferSize)
public MemoryStringWriter(int bufferSize, int maximumBufferIncrement)
Method Detail |
---|
public void write(char[] cbuf, int off, int len) throws IOException
write
in class Writer
cbuf
- Array of charactersoff
- Offset from which to start writing characterslen
- Number of characters to write
IOException
- If an I/O error occurspublic void flush() throws IOException
flush
in interface Flushable
flush
in class Writer
IOException
- If an I/O error occurspublic void close() throws IOException
close
in interface Closeable
close
in class Writer
IOException
- If an I/O error occurspublic int getCursor()
public MemoryStringReader createReader()
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |