|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.w3c.www.http.BasicValue
Field Summary | |
protected boolean |
isValid
Are the parsed values up to date with the lastly set unparsed value ? |
protected byte[] |
raw
The header value, as a byte array, if available. |
protected int |
rlen
The length of the byte value in case the above buffer is shared. |
protected int |
roff
The offset of the value in the above buffer, in case the buffer is shared. |
Constructor Summary | |
BasicValue()
|
Method Summary | |
void |
addBytes(byte[] buf,
int off,
int len)
HeaderValue implementation - Add these bytes to the header raw value. |
void |
appendValue(org.w3c.www.http.HttpBuffer buf)
Append this header value to the given output buffer. |
protected void |
checkByteValue()
Compute the new RFC822 compatible representation of this header value. |
void |
emit(java.io.OutputStream out)
HeaderValue implementation - Emit this header value to the given output stream. |
protected void |
error(java.lang.String msg)
Emit a parsing error. |
abstract java.lang.Object |
getValue()
HeaderValue implemenntation - Get this header value. |
protected void |
invalidateByteValue()
Invalidate the current byte value for this header, if any. |
protected abstract void |
parse()
Parse this header value into its various components. |
void |
setBytes(byte[] buf,
int off,
int len)
HeaderValue implementation - Reset the header byte value. |
void |
setString(java.lang.String strval)
Set this Header Value by parsing the given String. |
java.lang.String |
toExternalForm()
Return a String encoding this header value in an HTTP compatible way. |
java.lang.String |
toString()
Print this header value as it would be emited. |
protected abstract void |
updateByteValue()
Update the RFC822 compatible header value for this object. |
protected void |
validate()
Validate the parsed value according to the last set raw value. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
protected byte[] raw
protected int roff
protected int rlen
protected boolean isValid
Constructor Detail |
public BasicValue()
Method Detail |
protected abstract void parse() throws HttpParserException
protected abstract void updateByteValue()
protected final void checkByteValue()
updateByteValue
is called to perform the job.protected final void validate() throws HttpInvalidValueException
protected void invalidateByteValue()
protected void error(java.lang.String msg) throws HttpParserException
msg
- The error message.public void appendValue(org.w3c.www.http.HttpBuffer buf)
public java.lang.String toExternalForm()
public java.lang.String toString()
public void emit(java.io.OutputStream out) throws java.io.IOException
out
- The output stream to emit the header value to.public void addBytes(byte[] buf, int off, int len)
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.public void setBytes(byte[] buf, int off, int len)
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.public void setString(java.lang.String strval)
strval
- The String value for that object.public abstract java.lang.Object getValue()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |