com.atlassian.confluence.web.rangerequest
Class RangeRequest
java.lang.Object
com.atlassian.confluence.web.rangerequest.RangeRequest
- All Implemented Interfaces:
- Comparable<RangeRequest>
public class RangeRequest
- extends Object
- implements Comparable<RangeRequest>
Represents a valid HTTP byte range request
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.1
Constructor Summary |
RangeRequest(long firstByte,
long contentLength)
|
RangeRequest(long firstByte,
long lastByte,
long contentLength)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RANGE_PATTERN
public static final Pattern RANGE_PATTERN
RangeRequest
public RangeRequest(long firstByte,
long contentLength)
RangeRequest
public RangeRequest(long firstByte,
long lastByte,
long contentLength)
getOffset
public long getOffset()
getEnd
public long getEnd()
getRangeLength
public long getRangeLength()
getContentLength
public long getContentLength()
parse
public static RangeRequest parse(String headerValue,
long contentLength)
throws RangeNotSatisfiableException
- Parse a range header value into a RangeRequest
- Parameters:
headerValue
- the string value of the header
- Returns:
- a RangeRequest representing the contents of the header value
- Throws:
UnsupportedOperationException
- if the header value cannot be parsed
RangeNotSatisfiableException
- if the header value cannot be parsed
compareTo
public int compareTo(RangeRequest that)
- Specified by:
compareTo
in interface Comparable<RangeRequest>
Copyright © 2003–2015 Atlassian. All rights reserved.