Package org.infinispan.rest
Class CacheEntryInputStream
- java.lang.Object
-
- java.io.InputStream
-
- org.infinispan.rest.CacheEntryInputStream
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
public class CacheEntryInputStream extends InputStream
AnInputStream
that reads from aCacheStream
of byte[] and produces a JSON output. For example:[{"key":1,"value":"value","timeToLiveSeconds": -1, "maxIdleTimeSeconds": -1, "created": -1, "lastUsed": -1, "expireTime": -1}, {"key":2,"value":"value2","timeToLiveSeconds": -1, "maxIdleTimeSeconds": -1, "created": -1, "lastUsed": -1, "expireTime": -1}]
- Since:
- 12.0
-
-
Constructor Summary
Constructors Constructor Description CacheEntryInputStream(boolean keysAreJson, boolean valuesAreJson, CacheStream<? extends Map.Entry<?,?>> stream, int batchSize, boolean includeMetadata)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
available()
int
read()
-
Methods inherited from class java.io.InputStream
close, mark, markSupported, nullInputStream, read, read, readAllBytes, readNBytes, readNBytes, reset, skip, transferTo
-
-
-
-
Constructor Detail
-
CacheEntryInputStream
public CacheEntryInputStream(boolean keysAreJson, boolean valuesAreJson, CacheStream<? extends Map.Entry<?,?>> stream, int batchSize, boolean includeMetadata)
-
-
Method Detail
-
available
public int available()
- Overrides:
available
in classInputStream
-
read
public int read()
- Specified by:
read
in classInputStream
-
-