com.lowagie.text.rtf.document.output

Class RtfDiskCache

public class RtfDiskCache extends Object implements RtfDataCache

The RtfFileCache is a RtfDataCache that uses a temporary file to store the rtf document data. Not so fast, but doesn't use any memory (just disk space).

Version: $Revision: 1.1 $

Author: Mark Hall (mhall@edu.uni-klu.ac.at)

Field Summary
BufferedOutputStreamdata
The BufferedOutputStream that stores the cache data.
FiletempFile
The temporary file to store the data in.
Constructor Summary
RtfDiskCache()
Constructs a RtfFileCache.
Method Summary
OutputStreamgetOutputStream()
Gets the BufferedOutputStream to write to.
voidwriteTo(OutputStream target)
Writes the content of the temporary file into the OutputStream.

Field Detail

data

private BufferedOutputStream data
The BufferedOutputStream that stores the cache data.

tempFile

private File tempFile
The temporary file to store the data in.

Constructor Detail

RtfDiskCache

public RtfDiskCache()
Constructs a RtfFileCache. Creates the temp file.

Throws: IOException If the temporary file could not be created.

Method Detail

getOutputStream

public OutputStream getOutputStream()
Gets the BufferedOutputStream to write to.

writeTo

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