public abstract class AbstractChunkedReadResponse extends Object implements ChunkedResponse
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
isEndOfInput |
protected int |
length |
protected int |
maxFrameSize |
protected long |
position |
protected ReadRequest |
request |
| Constructor and Description |
|---|
AbstractChunkedReadResponse(ReadRequest request,
int maxFrameSize) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Releases the resources associated with the stream.
|
XrootdRequest |
getRequest()
Returns the request this is a response to.
|
boolean |
isEndOfInput()
Return
true if and only if there is no data left in the stream
and the stream has reached its end. |
ReadResponse |
nextChunk(io.netty.buffer.ByteBufAllocator alloc)
Fetches a chunk from the stream.
|
protected abstract io.netty.buffer.ByteBuf |
read(io.netty.buffer.ByteBufAllocator alloc,
long srcIndex,
int length) |
protected final ReadRequest request
protected final int maxFrameSize
protected long position
protected int length
protected boolean isEndOfInput
public AbstractChunkedReadResponse(ReadRequest request, int maxFrameSize)
public XrootdRequest getRequest()
ChunkedResponsegetRequest in interface ChunkedResponsepublic ReadResponse nextChunk(io.netty.buffer.ByteBufAllocator alloc) throws Exception
ChunkedResponsenextChunk in interface ChunkedResponseExceptionprotected abstract io.netty.buffer.ByteBuf read(io.netty.buffer.ByteBufAllocator alloc,
long srcIndex,
int length)
throws IOException
IOExceptionpublic boolean isEndOfInput()
throws Exception
ChunkedResponsetrue if and only if there is no data left in the stream
and the stream has reached its end.isEndOfInput in interface ChunkedResponseExceptionpublic void close()
throws Exception
ChunkedResponseclose in interface ChunkedResponseExceptionCopyright © 2011–2018 dCache.org. All rights reserved.