Class Range


  • public class Range
    extends Object
    Range header parsing logic
    Author:
    awoods
    • Constructor Detail

      • Range

        public Range​(long start)
        Left-bounded range
        Parameters:
        start - the start
    • Method Detail

      • hasRange

        public boolean hasRange()
        Does this range actually impose limits
        Returns:
        true if the range imposes limits
      • size

        public long size()
        Length contained in the range
        Returns:
        length of the range
      • start

        public long start()
        Start of the range
        Returns:
        start of the range
      • end

        public long end()
        End of the range
        Returns:
        end of the range
      • convert

        public static Range convert​(String source)
        Convert an HTTP Range header to a Range object
        Parameters:
        source - the source
        Returns:
        range object