public class ChunkedBlobStream
extends java.lang.Object
implements io.netty.handler.stream.ChunkedInput<io.netty.buffer.ByteBuf>
Constructor and Description |
---|
ChunkedBlobStream(java.lang.String clientId,
java.lang.String blobId,
long length,
java.io.InputStream in,
int chunkSize) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
boolean |
isEndOfInput() |
long |
length() |
long |
progress() |
io.netty.buffer.ByteBuf |
readChunk(io.netty.buffer.ByteBufAllocator allocator) |
io.netty.buffer.ByteBuf |
readChunk(io.netty.channel.ChannelHandlerContext ctx) |
long |
transferredBytes()
Returns the number of transferred bytes.
|
public ChunkedBlobStream(java.lang.String clientId, java.lang.String blobId, long length, java.io.InputStream in, int chunkSize)
clientId
- identifier for client requesting the blobblobId
- blob identifierlength
- blob lengthin
- blob streamchunkSize
- the number of bytes to fetch on each
readChunk(ChannelHandlerContext)
callpublic long transferredBytes()
public boolean isEndOfInput() throws java.lang.Exception
isEndOfInput
in interface io.netty.handler.stream.ChunkedInput<io.netty.buffer.ByteBuf>
java.lang.Exception
public void close() throws java.lang.Exception
close
in interface io.netty.handler.stream.ChunkedInput<io.netty.buffer.ByteBuf>
java.lang.Exception
public io.netty.buffer.ByteBuf readChunk(io.netty.channel.ChannelHandlerContext ctx) throws java.lang.Exception
readChunk
in interface io.netty.handler.stream.ChunkedInput<io.netty.buffer.ByteBuf>
java.lang.Exception
public io.netty.buffer.ByteBuf readChunk(io.netty.buffer.ByteBufAllocator allocator) throws java.lang.Exception
readChunk
in interface io.netty.handler.stream.ChunkedInput<io.netty.buffer.ByteBuf>
java.lang.Exception
public long length()
length
in interface io.netty.handler.stream.ChunkedInput<io.netty.buffer.ByteBuf>
public long progress()
progress
in interface io.netty.handler.stream.ChunkedInput<io.netty.buffer.ByteBuf>
Copyright © 2012–2022 The Apache Software Foundation. All rights reserved.