Class ContentRange

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

public class ContentRange extends Object
  • Constructor Details

    • ContentRange

      public ContentRange(String units, long start, long end, long length)
  • Method Details

    • getUnits

      public String getUnits()
      Returns:
      rangeUnits in lower case.
    • getStart

      public long getStart()
    • getEnd

      public long getEnd()
    • getLength

      public long getLength()
    • parse

      public static ContentRange parse(StringReader input) throws IOException
      Parses a Content-Range header from an HTTP header.
      Parameters:
      input - a reader over the header text
      Returns:
      the range parsed from the input, or null if not valid
      Throws:
      IOException - if there was a problem reading the input
    • isValid

      public boolean isValid()
      Returns:
      true if the content range is valid, per RFC 9110 section 14.4