public abstract class AbstractChunkedReadResponse extends Object implements ChunkedResponse
| Modifier and Type | Field and Description |
|---|---|
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()
Fetches a chunk from the stream.
|
protected abstract org.jboss.netty.buffer.ChannelBuffer |
read(long srcIndex,
int length) |
protected final ReadRequest request
protected final int maxFrameSize
protected long position
protected int length
public AbstractChunkedReadResponse(ReadRequest request, int maxFrameSize)
public XrootdRequest getRequest()
ChunkedResponsegetRequest in interface ChunkedResponsepublic ReadResponse nextChunk() throws Exception
ChunkedResponsenextChunk in interface ChunkedResponseExceptionprotected abstract org.jboss.netty.buffer.ChannelBuffer read(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 © 2013 dCache.org. All rights reserved.