|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.w3c.www.http.BasicValue
public abstract class 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. |
protected java.lang.Object |
clone()
|
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 |
---|
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
HttpParserException
- if unable to parse.protected abstract void updateByteValue()
protected final void checkByteValue()
updateByteValue
is called to perform the job.
protected final void validate() throws HttpInvalidValueException
HttpInvalidValueException
- If the value couldn't be parsed
properly.protected void invalidateByteValue()
protected void error(java.lang.String msg) throws HttpParserException
msg
- The error message.
HttpParserException
- If the parsing failed.public void appendValue(org.w3c.www.http.HttpBuffer buf)
appendValue
in interface HeaderValue
buf
- The buffer to append the byte value to.public java.lang.String toExternalForm()
toExternalForm
in interface HeaderValue
public java.lang.String toString()
toString
in class java.lang.Object
public void emit(java.io.OutputStream out) throws java.io.IOException
emit
in interface HeaderValue
out
- The output stream to emit the header value to.
java.io.IOException
- If some IO error occured.public void addBytes(byte[] buf, int off, int len)
addBytes
in interface HeaderValue
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)
setBytes
in interface HeaderValue
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()
getValue
in interface HeaderValue
protected java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |