Package jetbrains.buildServer.web.util
Class HttpByteRange
- java.lang.Object
-
- jetbrains.buildServer.web.util.HttpByteRange
-
public class HttpByteRange extends Object
- Author:
- Maxim.Manuylov Date: 08.09.2008
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
HttpByteRange.SimpleRange
-
Field Summary
Fields Modifier and Type Field Description static String
RANGE_UNIT_BYTES
-
Constructor Summary
Constructors Constructor Description HttpByteRange(long fileSize)
HttpByteRange(String range, Long fileSize)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getContentRangeHeaderValue(HttpByteRange.SimpleRange range)
static String
getContentRangeHeaderValueFor416Response(long fileSize)
long
getLength()
int
getRangesCount()
Iterator<HttpByteRange.SimpleRange>
getSimpleRangesIterator()
boolean
isFullRange()
-
-
-
Field Detail
-
RANGE_UNIT_BYTES
public static final String RANGE_UNIT_BYTES
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
HttpByteRange
public HttpByteRange(long fileSize)
-
HttpByteRange
public HttpByteRange(@NotNull String range, @Nullable Long fileSize) throws ParseException
- Throws:
ParseException
-
-
Method Detail
-
getSimpleRangesIterator
public Iterator<HttpByteRange.SimpleRange> getSimpleRangesIterator()
-
getLength
public long getLength()
-
getRangesCount
public int getRangesCount()
- Returns:
- the number of ranges. This is always 1 or greater
-
isFullRange
public boolean isFullRange()
-
getContentRangeHeaderValue
public String getContentRangeHeaderValue(HttpByteRange.SimpleRange range)
-
getContentRangeHeaderValueFor416Response
public static String getContentRangeHeaderValueFor416Response(long fileSize)
-
-