Class RtfDiskCache
java.lang.Object
com.lowagie.text.rtf.document.output.RtfDiskCache
- All Implemented Interfaces:
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: 3373 $
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final BufferedOutputStreamThe BufferedOutputStream that stores the cache data.private final FileThe temporary file to store the data in.Fields inherited from interface com.lowagie.text.rtf.document.output.RtfDataCache
CACHE_DISK, CACHE_MEMORY, CACHE_MEMORY_EFFICIENT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the BufferedOutputStream to write to.voidwriteTo(OutputStream target) Writes the content of the temporary file into the OutputStream.
-
Field Details
-
data
The BufferedOutputStream that stores the cache data. -
tempFile
The temporary file to store the data in.
-
-
Constructor Details
-
RtfDiskCache
Constructs a RtfFileCache. Creates the temp file.- Throws:
IOException- If the temporary file could not be created.
-
-
Method Details
-
getOutputStream
Gets the BufferedOutputStream to write to.- Specified by:
getOutputStreamin interfaceRtfDataCache- Returns:
- The OutputStream the RtfDocument can use.
-
writeTo
Writes the content of the temporary file into the OutputStream.- Specified by:
writeToin interfaceRtfDataCache- Parameters:
target- The OutputStream to write the content into.- Throws:
IOException- If an error occurs reading/writing.
-