org.w3c.www.http
Interface HeaderValue

All Known Implementing Classes:
BasicValue, CookieDate, DAVEntityTag, DAVIfList, DAVStatusURIList, DAVTimeout, HttpAccept, HttpAcceptCharset, HttpAcceptCharsetList, HttpAcceptEncoding, HttpAcceptEncodingList, HttpAcceptLanguage, HttpAcceptLanguageList, HttpAcceptList, HttpBag, HttpCacheControl, HttpCaseTokenList, HttpChallenge, HttpContentRange, HttpCookieList, HttpCredential, HttpDate, HttpEntityTag, HttpEntityTagList, HttpExtList, HttpInteger, HttpMimeType, HttpParamList, HttpRange, HttpRangeList, HttpSetCookieList, HttpString, HttpTokenList, HttpUpperTokenList, HttpWarning, HttpWarningList

public interface HeaderValue


Method Summary
 void addBytes(byte[] value, int off, int len)
          Add these bytes to the header raw value.
 void appendValue(org.w3c.www.http.HttpBuffer buf)
          Append this header byte value to the given buffer.
 void emit(java.io.OutputStream out)
          Emit this header value to the given output stream.
 java.lang.Object getValue()
          Get this header parsed value, in its native type.
 void setBytes(byte[] value, int off, int len)
          Reset the header byte value to the given byte array.
 java.lang.String toExternalForm()
          Return the HTTP encoding for this header value.
 

Method Detail

emit

void emit(java.io.OutputStream out)
          throws java.io.IOException
Emit this header value to the given output stream.

Parameters:
out - The output stream to emit this value to.
Throws:
java.io.IOException - If some IO error occurs while emiting the value.

addBytes

void addBytes(byte[] value,
              int off,
              int len)
Add these bytes to the header raw value.

Parameters:
value - The raw header value as a byte array.
off - The beginning of the raw value in the above byte buffer.
len - The length of the raw value in the above byte buffer.

setBytes

void setBytes(byte[] value,
              int off,
              int len)
Reset the header byte value to the given byte array.

Parameters:
value - The raw header value as a byte array.
off - The beginning of the raw value in the above byte buffer.
len - The length of the raw value in the above byte buffer.

getValue

java.lang.Object getValue()
Get this header parsed value, in its native type. HeaderValue implementors can be used as wrappers for the actual parsed header value. In such case this method should return the wrapped value (you would otherwise, probably want to return this).


toExternalForm

java.lang.String toExternalForm()
Return the HTTP encoding for this header value. This method is slow, and defeats nearly all the over-engeneered optimization of the HTTP parser.

Returns:
A String representing the header value in a format compatible with HTTP.

appendValue

void appendValue(org.w3c.www.http.HttpBuffer buf)
Append this header byte value to the given buffer.

Parameters:
buf - The buffer to append the byte value to.