org.w3c.www.http
Class HttpContentRange
java.lang.Object
|
+--org.w3c.www.http.BasicValue
|
+--org.w3c.www.http.HttpContentRange
- public class HttpContentRange
- extends BasicValue
Constructor Summary |
HttpContentRange(boolean isValid,
java.lang.String unit,
int firstpos,
int lastpos,
int length)
|
Methods inherited from class org.w3c.www.http.BasicValue |
addBytes,
appendValue,
checkByteValue,
emit,
error,
invalidateByteValue,
setBytes,
setString,
toExternalForm,
toString,
validate |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
HttpContentRange
public HttpContentRange(boolean isValid,
java.lang.String unit,
int firstpos,
int lastpos,
int length)
parse
protected void parse()
throws HttpParserException
- parse.
- Throws:
- HttpParserException - if parsing failed.
- Overrides:
- parse 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 this range first position.
The meaning of the returne integer is to be understood relative to
the unit, as obtained by
getUnit
method.
- Returns:
- An integer value for thr first position.
setFirstPosition
public void setFirstPosition(int firstpos)
- Set this range first position.
- Parameters:
firstpos
- The firt position of the range.
getLastPosition
public int getLastPosition()
- Get this range last position.
The meaning of the returne integer is to be understood relative to
the unit, as obtained by
getUnit
method.
- Returns:
- An integer value giving the last position.
setLastPosition
public void setLastPosition(int lastpos)
- Set this range last position.
- Parameters:
The
- last position, as an integer.
getFullLength
public int getFullLength()
- Get this range entity full length.
- Returns:
- The full length of the entity.
setFullLength
public void setFullLength(int length)
- Set this range entity full length.
- Parameters:
length
- The new full length for the entity.
getUnit
public java.lang.String getUnit()
- Get this content range's unit.
- Returns:
- A String giving the unit for the range, or null
if undefined.
setUnit
public void setUnit(java.lang.String unit)
- Set this content range's unit.
- Parameters:
unit
- The unit in which this range was measured.