org.apache.fop.pdf
Class TempFileStreamCache
java.lang.Objectorg.apache.fop.pdf.TempFileStreamCache
- StreamCache
public class TempFileStreamCache
extends java.lang.Object
StreamCache implementation that uses temporary files rather than heap.
void | clear()- Clears and resets the cache.
|
OutputStream | getOutputStream()- Get the current OutputStream.
|
int | getSize()- Returns the current size of the stream.
|
int | outputContents(OutputStream out)- Outputs the cached bytes to the given stream.
|
void | write(byte[] data)
|
TempFileStreamCache
public TempFileStreamCache()
throws IOException Creates a new TempFileStreamCache.
clear
public void clear()
throws IOException Clears and resets the cache.
- clear in interface StreamCache
getOutputStream
public OutputStream getOutputStream()
throws IOException Get the current OutputStream. Do not store it - it may change
from call to call.
- getOutputStream in interface StreamCache
- the output stream for this cache
getSize
public int getSize()
throws IOException Returns the current size of the stream.
- getSize in interface StreamCache
outputContents
public int outputContents(OutputStream out)
throws IOException Outputs the cached bytes to the given stream.
- outputContents in interface StreamCache
out - the output stream to write to
- the number of bytes written
write
public void write(byte[] data)
throws IOException- write in interface StreamCache
Copyright 1999-2007 The Apache Software Foundation. All Rights Reserved.