Class CacheEntryInputStream

  • All Implemented Interfaces:
    Closeable, AutoCloseable

    public class CacheEntryInputStream
    extends InputStream
    An InputStream that reads from a CacheStream 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 Detail

      • CacheEntryInputStream

        public CacheEntryInputStream​(boolean keysAreJson,
                                     boolean valuesAreJson,
                                     CacheStream<? extends Map.Entry<?,​?>> stream,
                                     int batchSize,
                                     boolean includeMetadata)
    • Method Detail

      • available

        public int available()
      • read

        public int read()