public class TempFileStreamCache extends Object implements StreamCache
Constructor and Description |
---|
TempFileStreamCache()
Creates a new TempFileStreamCache.
|
Modifier and Type | Method and Description |
---|---|
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)
Convenience method for writing data to the stream cache.
|
public TempFileStreamCache() throws IOException
IOException
- if there is an IO errorpublic OutputStream getOutputStream() throws IOException
getOutputStream
in interface StreamCache
IOException
- if there is an IO errorpublic void write(byte[] data) throws IOException
write
in interface StreamCache
data
- byte array to writeIOException
- if there is an IO errorpublic int outputContents(OutputStream out) throws IOException
outputContents
in interface StreamCache
out
- the output stream to write toIOException
- if there is an IO errorpublic int getSize() throws IOException
getSize
in interface StreamCache
IOException
- if there is an IO errorpublic void clear() throws IOException
clear
in interface StreamCache
IOException
- if there is an IO errorCopyright © 2025 Apache Software Foundation. All rights reserved.