org.w3c.www.http
Class HttpRange
java.lang.Object
|
+--org.w3c.www.http.BasicValue
|
+--org.w3c.www.http.HttpRange
- public class HttpRange
- extends BasicValue
Field Summary |
protected int |
firstpos
First position in the range. |
protected int |
lastpos
Last position in the range. |
protected HttpRangeList |
list
The list we belong to, if any. |
protected java.lang.String |
unit
The range's unit. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
firstpos
protected int firstpos
- First position in the range.
lastpos
protected int lastpos
- Last position in the range.
unit
protected java.lang.String unit
- The range's unit.
list
protected HttpRangeList list
- The list we belong to, if any.
HttpRange
public HttpRange()
parse
protected void parse()
throws HttpParserException
- parse.
- Throws:
- HttpParserException - if parsing failed.
- Overrides:
- parse in class BasicValue
invalidateByteValue
protected void invalidateByteValue()
- Overrides:
- invalidateByteValue in class BasicValue
updateByteValue
protected void updateByteValue()
- Overrides:
- updateByteValue in class BasicValue
getValue
public java.lang.Object getValue()
- Overrides:
- getValue in class BasicValue
getFirstPosition
public int getFirstPosition()
- Get the first position of the range.
- Returns:
- An integer giving the first pos for the range, or -1
if undefined.
setFirstPosition
public void setFirstPosition(int firstpos)
- Set the first position of the range.
- Parameters:
firstpos
- The first positon for the range.
getLastPosition
public int getLastPosition()
- Get the last position for this range.
If the first position is negative, then the last position is to be
considered as the number of bytes relative to the end of the content.
- Returns:
- An integer giving the last position.
setLastPosition
public void setLastPosition(int lastpos)
- Set the last position for this range.
If the given number is negative, it is considered to be a number
of bytes relative to the end of the content (eg the last N bytes).
- Parameters:
lastpos
- The new last position.
setUnit
public void setUnit(java.lang.String unit)
- Set the unit in which this range is taken.
getUnit
public java.lang.String getUnit()
- Get the unit in which this range is taken.
- Returns:
- The unit in which this range is measured, or
null if undefined.