Interface Content.Source.Factory

Enclosing interface:
Content.Source

public static interface Content.Source.Factory
Factory of Content.Source.
  • Method Details

    • newContentSource

      Content.Source newContentSource(ByteBufferPool.Sized bufferPool, long offset, long length)
      Creates a new Content.Source.
      Parameters:
      bufferPool - the ByteBufferPool.Sized to get buffers from. null means allocate new buffers as needed.
      offset - the offset byte of the content to start from. Must be greater than or equal to 0 and less than the content length (if known).
      length - the length of the content to make available, -1 for the full length. If the size of the content is known, the length may be truncated to the content size minus the offset.
      Returns:
      a Content.Source.
      Throws:
      IndexOutOfBoundsException - if the offset or length are out of range.
      See Also:
      • TypeUtil.checkOffsetLengthSize(long, long, long)