Class AbstractChunkedReadResponse

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method 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)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • maxFrameSize

        protected final int maxFrameSize
      • position

        protected long position
      • length

        protected int length
      • isEndOfInput

        protected boolean isEndOfInput
    • Constructor Detail

      • AbstractChunkedReadResponse

        public AbstractChunkedReadResponse​(ReadRequest request,
                                           int maxFrameSize)
    • Method Detail

      • nextChunk

        public ReadResponse nextChunk​(io.netty.buffer.ByteBufAllocator alloc)
                               throws java.lang.Exception
        Description copied from interface: ChunkedResponse
        Fetches a chunk from the stream.
        Specified by:
        nextChunk in interface ChunkedResponse
        Returns:
        the fetched chunk
        Throws:
        java.lang.Exception
      • read

        protected abstract io.netty.buffer.ByteBuf read​(io.netty.buffer.ByteBufAllocator alloc,
                                                        long srcIndex,
                                                        int length)
                                                 throws java.io.IOException
        Throws:
        java.io.IOException
      • isEndOfInput

        public boolean isEndOfInput()
                             throws java.lang.Exception
        Description copied from interface: ChunkedResponse
        Return true if and only if there is no data left in the stream and the stream has reached its end.
        Specified by:
        isEndOfInput in interface ChunkedResponse
        Throws:
        java.lang.Exception
      • close

        public void close()
                   throws java.lang.Exception
        Description copied from interface: ChunkedResponse
        Releases the resources associated with the stream.
        Specified by:
        close in interface ChunkedResponse
        Throws:
        java.lang.Exception