|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Header
This is a Header object that is used to represent a
basic form for the HTTP request message. This is used to extract
values such as the request line and header values from the request
message. Access to header values is done case insensitively.
As well as providing the header values and request line values this will also provide convenience methods which enable the user to determine the length of the body this message header prefixes.
| Method Summary | |
|---|---|
Address |
getAddress()
This is used to acquire the address from the request line. |
Cookie |
getCookie(String name)
This is used to acquire a cookie usiing the name of that cookie. |
List<Cookie> |
getCookies()
This is used to acquire all cookies that were sent in the header. |
long |
getDate(String name)
This can be used to get the date of the first message header that has the specified name. |
CharSequence |
getHeader()
This method returns a CharSequence holding the data
consumed for the request. |
int |
getInteger(String name)
This can be used to get the integer of the first message header that has the specified name. |
List<Locale> |
getLocales()
This is used to acquire the locales from the request header. |
int |
getMajor()
This can be used to get the major number from a HTTP version. |
String |
getMethod()
This can be used to get the HTTP method for this request. |
int |
getMinor()
This can be used to get the minor number from a HTTP version. |
List<String> |
getNames()
This method is used to get a List of the names
for the headers. |
Path |
getPath()
This is used to acquire the path as extracted from the the HTTP request URI. |
Query |
getQuery()
This method is used to acquire the query part from the HTTP request URI target. |
String |
getTarget()
This can be used to get the target specified for this HTTP request. |
boolean |
isExpectContinue()
This is used to determine if the header represents one that requires the HTTP/1.1 continue expectation. |
String |
toString()
This method returns a string representing the header that was consumed by this consumer. |
| Methods inherited from interface org.simpleframework.http.message.Segment |
|---|
getContentLength, getContentType, getDisposition, getFileName, getName, getTransferEncoding, getValue, getValue, getValues, isFile |
| Method Detail |
|---|
String getTarget()
CharSequence getHeader()
CharSequence holding the data
consumed for the request. A character sequence is returned as it
can provide a much more efficient means of representing the header
data by just wrapping the consumed byte array.
Address getAddress()
Path getPath()
Path object that is
provided by this method is immutable, it represents the
normalized path only part from the request URI.
Query getQuery()
String getMethod()
int getMajor()
int getMinor()
List<String> getNames()
List of the names
for the headers. This will provide the original names for the
HTTP headers for the message. Modifications to the provided
list will not affect the header, the list is a simple copy.
int getInteger(String name)
name - the HTTP message header to get the value from
long getDate(String name)
name - the HTTP message header to get the value from
Cookie getCookie(String name)
Cookie object. Otherwise this method will
return null. Each cookie object will contain the name, value
and path of the cookie as well as the optional domain part.
name - this is the name of the cookie object to acquire
List<Cookie> getCookies()
Cookie objects. Otherwise this method will an
empty list. Each cookie object will contain the name, value and
path of the cookie as well as the optional domain part.
List<Locale> getLocales()
Accept-Language header.
This provides an indication as to the languages that the client
accepts. It provides the locales in preference order.
boolean isExpectContinue()
String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||