Class Range


  • public class Range
    extends Object
    A class representing an HTTP Range header.
    • Constructor Detail

      • Range

        public Range​(int from,
                     int to)
        Create a Range object.
        Parameters:
        from - the from value
        to - the to value
    • Method Detail

      • getFrom

        public int getFrom()
        Get the from value.
        Returns:
        the byte offset
      • getTo

        public int getTo()
        Get the to value.
        Returns:
        the byte end
      • valueOf

        public static Range valueOf​(String value)
        Get a Range object from a header value.
        Parameters:
        value - the header value
        Returns:
        the Range object or null if the value is not parseable