Class RtfMemoryCache
java.lang.Object
com.lowagie.text.rtf.document.output.RtfMemoryCache
- All Implemented Interfaces:
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 $
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ByteArrayOutputStreamThe buffer for the rtf document data.Fields inherited from interface RtfDataCache
CACHE_DISK, CACHE_MEMORY, CACHE_MEMORY_EFFICIENT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the ByteArrayOutputStream.voidwriteTo(OutputStream target) Writes the content of the ByteArrayOutputStream into the OutputStream.
-
Field Details
-
data
The buffer for the rtf document data.
-
-
Constructor Details
-
RtfMemoryCache
public RtfMemoryCache()Constructs a RtfMemoryCache.
-
-
Method Details
-
getOutputStream
Gets the ByteArrayOutputStream.- Specified by:
getOutputStreamin interfaceRtfDataCache- Returns:
- The OutputStream the RtfDocument can use.
-
writeTo
Writes the content of the ByteArrayOutputStream into the OutputStream.- Specified by:
writeToin interfaceRtfDataCache- Parameters:
target- The OutputStream to write the content into.- Throws:
IOException- If an error occurs reading/writing.
-