# Class Ranges

java.lang.Object
org.apache.tomcat.util.http.parser.Ranges

public class Ranges extends Object
Represents the value of an HTTP Range header.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static class`
  `Ranges.Entry`
  Represents a single range entry with a start and end position.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `List<Ranges.Entry>`
  `getEntries()`
  Returns the list of range entries.
  `String`
  `getUnits()`
  Returns the range units (e.g., "bytes").
  `static Ranges`
  `parse(StringReader input)`
  Parses a Range header from an HTTP header.

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### getEntries

    public List<Ranges.Entry> getEntries()
    Returns the list of range entries.
    Returns:
      an unmodifiable list of range entries

  - ### getUnits

    public String getUnits()
    Returns the range units (e.g., "bytes").
    Returns:
      the range units, or null if not specified

  - ### parse

    public static Ranges parse(StringReader input) throws IOException
    Parses a Range header from an HTTP header.
    Parameters:
      `input` - a reader over the header text
    Returns:
      a set of ranges parsed from the input, or null if not valid
    Throws:
      `IOException` - if there was a problem reading the input