com.lowagie.text.rtf.document.output

Class RtfMemoryCache

public class RtfMemoryCache extends Object implements RtfDataCache

The RtfMemoryCache is an RtfDataCache that keeps the whole rtf document data in memory. Fast but memory intensive.

Version: $Id: RtfMemoryCache.java 3373 2008-05-12 16:21:24Z xlv $

Author: Mark Hall (Mark.Hall@mail.room3b.eu) Thomas Bickel (tmb99@inode.at)

Field Summary
ByteArrayOutputStreamdata
The buffer for the rtf document data.
Constructor Summary
RtfMemoryCache()
Constructs a RtfMemoryCache.
Method Summary
OutputStreamgetOutputStream()
Gets the ByteArrayOutputStream.
voidwriteTo(OutputStream target)
Writes the content of the ByteArrayOutputStream into the OutputStream.

Field Detail

data

private ByteArrayOutputStream data
The buffer for the rtf document data.

Constructor Detail

RtfMemoryCache

public RtfMemoryCache()
Constructs a RtfMemoryCache.

Method Detail

getOutputStream

public OutputStream getOutputStream()
Gets the ByteArrayOutputStream.

writeTo

public void writeTo(OutputStream target)
Writes the content of the ByteArrayOutputStream into the OutputStream.