public class ByteRange extends Object
| Modifier and Type | Class and Description |
|---|---|
static class | ByteRange.Range |
static class | ByteRange.RangeResponseResult |
| Constructor and Description |
|---|
ByteRange(List<ByteRange.Range> ranges) |
| Modifier and Type | Method and Description |
|---|---|
long | getEnd(int range) Gets the end of the specified range segment, or the number of bytes if this is a suffix range segment |
int | getRanges() |
ByteRange.RangeResponseResult | getResponseResult(long resourceContentLength, String ifRange, Date lastModified, String eTag) Returns a representation of the range result. |
long | getStart(int range) Gets the start of the specified range segment, of -1 if this is a suffix range segment |
static ByteRange | parse(String rangeHeader) Attempts to parse a range request. |
public ByteRange(List<ByteRange.Range> ranges)
public int getRanges()
public long getStart(int range)
range - The range segment to getpublic long getEnd(int range)
range - The range segment to getpublic static ByteRange parse(String rangeHeader)
rangeHeader - The range specpublic ByteRange.RangeResponseResult getResponseResult(long resourceContentLength, String ifRange, Date lastModified, String eTag)
resourceContentLength - Copyright © 2020 JBoss by Red Hat. All rights reserved.