com.lowagie.text.rtf.document.output
Class RtfMemoryCache

java.lang.Object
  extended by com.lowagie.text.rtf.document.output.RtfMemoryCache
All Implemented Interfaces:
RtfDataCache

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:
$Revision: 1.1 $
Author:
Mark Hall (mhall@edu.uni-klu.ac.at)

Field Summary
 
Fields inherited from interface com.lowagie.text.rtf.document.output.RtfDataCache
CACHE_DISK, CACHE_MEMORY
 
Constructor Summary
RtfMemoryCache()
          Constructs a RtfMemoryCache.
 
Method Summary
 OutputStream getOutputStream()
          Gets the ByteArrayOutputStream.
 void writeTo(OutputStream target)
          Writes the content of the ByteArrayOutputStream into the OutputStream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RtfMemoryCache

public RtfMemoryCache()
Constructs a RtfMemoryCache.

Method Detail

getOutputStream

public OutputStream getOutputStream()
Gets the ByteArrayOutputStream.

Specified by:
getOutputStream in interface RtfDataCache
Returns:
The OutputStream the RtfDocument can use.

writeTo

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

Specified by:
writeTo in interface RtfDataCache
Parameters:
target - The OutputStream to write the content into.
Throws:
IOException - If an error occurs reading/writing.


Copyright © 2006-2007 EGIZ - E-Government Innovationszentrum. All Rights Reserved.