Class CopyingStreamWindow

    • Constructor Detail

      • CopyingStreamWindow

        public CopyingStreamWindow​( allocator)
    • Method Detail

      • add

        public void add​( buf)
        Description copied from interface: StreamWindow
        Appends the given buffer to the end of the stream. The window takes ownership of the buffer (and may even release it immediately).
        Specified by:
        add in interface StreamWindow
      • releaseBefore

        public void releaseBefore​(long releaseStreamOffset)
        Description copied from interface: StreamWindow
        Forgets any bytes with stream offsets lower then the given offset.
        Specified by:
        releaseBefore in interface StreamWindow
        releaseStreamOffset - offset relative to the start of the stream.
      • getBytes

        public byte[] getBytes​(long startStreamOffset,
                               long endStreamOffset)
        Description copied from interface: StreamWindow
        Returns a region of the stream as a byte array.
        Specified by:
        getBytes in interface StreamWindow
        startStreamOffset - region start offset relative to beginning of stream.
        endStreamOffset - region end offset relative to beginning of stream.