Class StreamedChunk.ContentRange

  • Enclosing class:
    StreamedChunk

    public static class StreamedChunk.ContentRange
    extends Object
    Parses Content-Range headers according to spec https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html section 14.16 Content-Range = "Content-Range" ":" content-range-spec content-range-spec = byte-content-range-spec byte-content-range-spec = bytes-unit SP byte-range-resp-spec "/" ( instance-length | "*" ) byte-range-resp-spec = (first-byte-pos "-" last-byte-pos) | "*" instance-length = 1*DIGIT eg bytes 0-1233/1234 bytes 500-1233/1234 bytes 500-1233/* According to https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.12 "bytes" is the only valid range unit.
    • Field Detail

      • length

        public long length
      • offset

        public long offset
      • range

        public long range
    • Constructor Detail

      • ContentRange

        public ContentRange​(String contentRangeHeader)