All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class w3c.www.http.BasicValue

java.lang.Object
   |
   +----w3c.www.http.BasicValue

public abstract class BasicValue
extends Object
implements HeaderValue

Variable Index

 o isValid
Are the parsed values up to date with the lastly set unparsed value ?
 o raw
The header value, as a byte array, if available.
 o rlen
The length of the byte value in case the above buffer is shared.
 o roff
The offset of the value in the above buffer, in case the buffer is shared.

Method Index

 o addBytes(byte[], int, int)
HeaderValue implementation - Add these bytes to the header raw value.
 o appendValue(HttpBuffer)
Append this header value to the given output buffer.
 o checkByteValue()
Compute the new RFC822 compatible representation of this header value.
 o emit(OutputStream)
HeaderValue implementation - Emit this header value to the given output stream.
 o error(String)
Emit a parsing error.
 o getValue()
HeaderValue implemenntation - Get this header value.
 o invalidateByteValue()
Invalidate the current byte value for this header, if any.
 o parse()
Parse this header value into its various components.
 o setBytes(byte[], int, int)
HeaderValue implementation - Reset the header byte value.
 o setString(String)
Set this Header Value by parsing the given String.
 o toExternalForm()
Return a String encoding this header value in an HTTP compatible way.
 o toString()
Print this header value as it would be emited.
 o updateByteValue()
Update the RFC822 compatible header value for this object.
 o validate()
Validate the parsed value according to the last set raw value.

Variables

 o raw
 protected byte raw[]
The header value, as a byte array, if available.

 o roff
 protected int roff
The offset of the value in the above buffer, in case the buffer is shared.

 o rlen
 protected int rlen
The length of the byte value in case the above buffer is shared.

 o isValid
 protected boolean isValid
Are the parsed values up to date with the lastly set unparsed value ?

Methods

 o parse
 protected abstract void parse() throws HttpParserException
Parse this header value into its various components.

 o updateByteValue
 protected abstract void updateByteValue()
Update the RFC822 compatible header value for this object.

 o checkByteValue
 protected final void checkByteValue()
Compute the new RFC822 compatible representation of this header value. If our value is up to date, we just return, otherwise, the abstract updateByteValue is called to perform the job.

 o validate
 protected final void validate() throws HttpInvalidValueException
Validate the parsed value according to the last set raw value. This will trigger the header value parsing, if it is required at this point.

Throws: HttpInvalidValueException
If the value couldn't be parsed properly.
 o invalidateByteValue
 protected void invalidateByteValue()
Invalidate the current byte value for this header, if any.

 o error
 protected void error(String msg) throws HttpParserException
Emit a parsing error.

Parameters:
msg - The error message.
Throws: n
HttpParserException If the parsing failed.
 o appendValue
 public void appendValue(HttpBuffer buf)
Append this header value to the given output buffer.

Returns:
The header value as a byte array.
 o toExternalForm
 public String toExternalForm()
Return a String encoding this header value in an HTTP compatible way.

Returns:
A String.
 o toString
 public String toString()
Print this header value as it would be emited.

Returns:
A String representation of this header value.
Overrides:
toString in class Object
 o emit
 public void emit(OutputStream out) throws IOException
HeaderValue implementation - Emit this header value to the given output stream.

Parameters:
out - The output stream to emit the header value to.
Throws: IOException
If some IO error occured.
 o addBytes
 public void addBytes(byte buf[],
                      int off,
                      int len)
HeaderValue implementation - Add these bytes to the header raw value.

Parameters:
buf - The byte buffer containing some part of the header value.
off - The offset of the header value in above buffer.
len - The length of the header value in above buffer.
 o setBytes
 public void setBytes(byte buf[],
                      int off,
                      int len)
HeaderValue implementation - Reset the header byte value.

Parameters:
buf - The byte buffer containing some part of the header value.
off - The offset of the header value in above buffer.
len - The length of the header value in above buffer.
 o setString
 public void setString(String strval)
Set this Header Value by parsing the given String.

Parameters:
strval - The String value for that object.
Returns:
Itself.
 o getValue
 public abstract Object getValue()
HeaderValue implemenntation - Get this header value.

Returns:
An object representing the parsed value for this header.

All Packages  Class Hierarchy  This Package  Previous  Next  Index