Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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.

Fields inherited from class org.w3c.www.http.BasicValue
`isValid, raw, rlen, roff`

Constructor Summary
`HttpRange()`

Method Summary
`int` | `getFirstPosition()` Get the first position of the range.
`int` | `getLastPosition()` Get the last position for this range.
`java.lang.String` | `getUnit()` Get the unit in which this range is taken.
`java.lang.Object` | `getValue()`
`protected void` | `invalidateByteValue()`
`protected void` | `parse()` parse.
`void` | `setFirstPosition(int firstpos)` Set the first position of the range.
`void` | `setLastPosition(int lastpos)` Set the last position for this range.
`void` | `setUnit(java.lang.String unit)` Set the unit in which this range is taken.
`protected void` | `updateByteValue()`

Methods inherited from class org.w3c.www.http.BasicValue
`addBytes, appendValue, checkByteValue, emit, error, setBytes, setString, toExternalForm, toString, validate`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### 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.

Constructor Detail

### HttpRange

    public HttpRange()

Method Detail

### 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.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD