Package 

Object BytesRange.Companion

    • Method Detail

      • from

         final BytesRange from(Integer from)

        Specifies a bytes range to request only the bytes from a specified index up to the end of the data.

        Parameters:
        from - the first byte to request, must be positive or zero
      • toMax

         final BytesRange toMax(Integer to)

        Specifies a bytes range to request no more than a specified number of bytes. If the encoded image is less than the requested maximum you may still get the entire result.

        Parameters:
        to - the maximum byte to be requested, must be positive
      • fromContentRangeHeader

         final BytesRange fromContentRangeHeader(String header)

        Creates an instance of BytesRange by parsing the value of a returned HTTP "Content-Range" header.

        If the range runs to the end of the available content, the end of the range will be set to TO_END_OF_CONTENT.

        The header spec is at https://tools.ietf.org/html/rfc2616#section-14.16