List of usage examples for io.netty.buffer ByteBufInputStream ByteBufInputStream
public ByteBufInputStream(ByteBuf buffer, int length, boolean releaseOnClose)
From source file:blazingcache.client.CacheEntry.java
License:Apache License
/** * Access to data. You have to close the stream in order to handle correctly * refcounts/* w ww .j a va 2 s.c o m*/ * * @return */ public InputStream getSerializedDataStream() { return new ByteBufInputStream(buf.retainedSlice(), buf.readableBytes(), true /* releaseOnClose */); }