Class InputStreamCache
- java.lang.Object
-
- java.io.InputStream
-
- java.io.ByteArrayInputStream
-
- org.apache.camel.converter.stream.InputStreamCache
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,org.apache.camel.StreamCache
public final class InputStreamCache extends ByteArrayInputStream implements org.apache.camel.StreamCache
AStreamCache
for caching using an in-memory byte array.
-
-
Field Summary
-
Fields inherited from class java.io.ByteArrayInputStream
buf, count, mark, pos
-
-
Constructor Summary
Constructors Constructor Description InputStreamCache(byte[] data)
InputStreamCache(byte[] data, int count)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.camel.StreamCache
copy(org.apache.camel.Exchange exchange)
boolean
inMemory()
long
length()
void
writeTo(OutputStream os)
-
Methods inherited from class java.io.ByteArrayInputStream
available, close, mark, markSupported, read, read, readAllBytes, readNBytes, reset, skip, transferTo
-
Methods inherited from class java.io.InputStream
nullInputStream, read, readNBytes
-
-
-
-
Method Detail
-
writeTo
public void writeTo(OutputStream os) throws IOException
- Specified by:
writeTo
in interfaceorg.apache.camel.StreamCache
- Throws:
IOException
-
copy
public org.apache.camel.StreamCache copy(org.apache.camel.Exchange exchange)
- Specified by:
copy
in interfaceorg.apache.camel.StreamCache
-
inMemory
public boolean inMemory()
- Specified by:
inMemory
in interfaceorg.apache.camel.StreamCache
-
length
public long length()
- Specified by:
length
in interfaceorg.apache.camel.StreamCache
-
-