public class StreamSourceCache extends StreamSource implements StreamCache
StreamCache
implementation for Cache the StreamSource StreamSource
sFEATURE
Constructor and Description |
---|
StreamSourceCache(StreamSource source,
Exchange exchange) |
Modifier and Type | Method and Description |
---|---|
InputStream |
getInputStream() |
void |
reset()
Resets the StreamCache for a new stream consumption.
|
void |
setInputStream(InputStream inputStream) |
void |
writeTo(OutputStream os)
Writes the stream to the given output
|
getPublicId, getReader, getSystemId, setPublicId, setReader, setSystemId, setSystemId
public StreamSourceCache(StreamSource source, Exchange exchange) throws IOException
IOException
public void reset()
StreamCache
reset
in interface StreamCache
public void writeTo(OutputStream os) throws IOException
StreamCache
writeTo
in interface StreamCache
os
- the destination to write toIOException
- is thrown if write failspublic InputStream getInputStream()
getInputStream
in class StreamSource
public void setInputStream(InputStream inputStream)
setInputStream
in class StreamSource
Apache Camel