public class TempFileStreamCache extends java.lang.Object implements StreamCache
| Constructor and Description |
|---|
TempFileStreamCache()
Creates a new TempFileStreamCache.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears and resets the cache.
|
java.io.OutputStream |
getOutputStream()
Get the current OutputStream.
|
int |
getSize()
Returns the current size of the stream.
|
int |
outputContents(java.io.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 java.io.IOException
java.io.IOException - if there is an IO errorpublic java.io.OutputStream getOutputStream()
throws java.io.IOException
getOutputStream in interface StreamCachejava.io.IOException - if there is an IO errorpublic void write(byte[] data)
throws java.io.IOException
write in interface StreamCachedata - byte array to writejava.io.IOException - if there is an IO errorpublic int outputContents(java.io.OutputStream out)
throws java.io.IOException
outputContents in interface StreamCacheout - the output stream to write tojava.io.IOException - if there is an IO errorpublic int getSize()
throws java.io.IOException
getSize in interface StreamCachejava.io.IOException - if there is an IO errorpublic void clear()
throws java.io.IOException
clear in interface StreamCachejava.io.IOException - if there is an IO errorCopyright 1999-2022 The Apache Software Foundation. All Rights Reserved.