public class RtfDiskCache extends java.lang.Object implements RtfDataCache
| Modifier and Type | Field and Description |
|---|---|
private java.io.BufferedOutputStream |
data
The BufferedOutputStream that stores the cache data.
|
private java.io.File |
tempFile
The temporary file to store the data in.
|
CACHE_DISK, CACHE_MEMORY, CACHE_MEMORY_EFFICIENT| Constructor and Description |
|---|
RtfDiskCache()
Constructs a RtfFileCache.
|
| Modifier and Type | Method and Description |
|---|---|
java.io.OutputStream |
getOutputStream()
Gets the BufferedOutputStream to write to.
|
void |
writeTo(java.io.OutputStream target)
Writes the content of the temporary file into the OutputStream.
|
private java.io.BufferedOutputStream data
private java.io.File tempFile
public RtfDiskCache()
throws java.io.IOException
java.io.IOException - If the temporary file could not be created.public java.io.OutputStream getOutputStream()
getOutputStream in interface RtfDataCachepublic void writeTo(java.io.OutputStream target)
throws java.io.IOException
writeTo in interface RtfDataCachetarget - The OutputStream to write the content into.java.io.IOException - If an error occurs reading/writing.