/** * This is used to acquire the address from the request line. * An address is the full URI including the scheme, domain, port * and the query parts. This allows various parameters to be * acquired without having to parse the raw request target URI. * * @return this returns the address of the request line */ public Address getAddress() { return header.getAddress(); }
/** * This is a convenience method that can be used to determine * the length of the message body. This will determine if there * is a <code>Content-Length</code> header, if it does then the * length can be determined, if not then this returns -1. * * @return the content length, or -1 if it cannot be determined */ public long getContentLength() { return header.getContentLength(); }
/** * This is a convenience method that can be used to determine the * content type of the message body. This will determine whether * there is a <code>Content-Type</code> header, if there is then * this will parse that header and represent it as a typed object * which will expose the various parts of the HTTP header. * * @return this returns the content type value if it exists */ public ContentType getContentType() { return header.getContentType(); }
/** * This can be used to get the major number from a HTTP version. * The major version corresponds to the major type that is the 1 * of a HTTP/1.0 version string. * * @return the major version number for the request message */ public int getMajor() { return header.getMajor(); }
/** * This method returns a <code>CharSequence</code> holding the header * 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. * * @return this returns the characters consumed for the header */ public CharSequence getHeader() { return header.getHeader(); }
/** * This is used to acquire the locales from the request header. The * locales are provided in the <code>Accept-Language</code> header. * This provides an indication as to the languages that the client * accepts. It provides the locales in preference order. * * @return this returns the locales preferred by the client */ public List<Locale> getLocales() { return header.getLocales(); }
/** * This is used to acquire all cookies that were sent in the header. * If any cookies exists within the HTTP header they are returned * as <code>Cookie</code> 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. * * @return this returns all cookie objects from the HTTP header */ public List<Cookie> getCookies() { return header.getCookies(); }
/** * This can be used to get the integer of the first message header * that has the specified name. This is a convenience method that * avoids having to deal with parsing the value of the requested * HTTP message header. This returns -1 if theres no HTTP header * value for the specified name. * * @param name the HTTP message header to get the value from * * @return this returns the date as a long from the header value */ public int getInteger(String name) { return header.getInteger(name); }
/** * This can be used to get the date of the first message header * that has the specified name. This is a convenience method that * avoids having to deal with parsing the value of the requested * HTTP message header. This returns -1 if theres no HTTP header * value for the specified name. * * @param name the HTTP message header to get the value from * * @return this returns the date as a long from the header value */ public long getDate(String name) { return header.getDate(name); }
/** * This is used to acquire a cookie usiing the name of that cookie. * If the cookie exists within the HTTP header then it is returned * as a <code>Cookie</code> 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. * * @param name this is the name of the cookie object to acquire * * @return this returns a cookie object from the header or null */ public Cookie getCookie(String name) { return header.getCookie(name); }
/** * This can be used to get the major number from a HTTP version. * The major version corresponds to the major type that is the 1 * of a HTTP/1.0 version string. * * @return the major version number for the request message */ public int getMajor() { return header.getMajor(); }
/** * This method returns a <code>CharSequence</code> holding the header * 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. * * @return this returns the characters consumed for the header */ public CharSequence getHeader() { return header.getHeader(); }
/** * This is used to acquire the locales from the request header. The * locales are provided in the <code>Accept-Language</code> header. * This provides an indication as to the languages that the client * accepts. It provides the locales in preference order. * * @return this returns the locales preferred by the client */ public List<Locale> getLocales() { return header.getLocales(); }
/** * This is used to acquire all cookies that were sent in the header. * If any cookies exists within the HTTP header they are returned * as <code>Cookie</code> 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. * * @return this returns all cookie objects from the HTTP header */ public List<Cookie> getCookies() { return header.getCookies(); }
/** * This can be used to get the integer of the first message header * that has the specified name. This is a convenience method that * avoids having to deal with parsing the value of the requested * HTTP message header. This returns -1 if theres no HTTP header * value for the specified name. * * @param name the HTTP message header to get the value from * * @return this returns the date as a long from the header value */ public int getInteger(String name) { return header.getInteger(name); }
/** * This can be used to get the date of the first message header * that has the specified name. This is a convenience method that * avoids having to deal with parsing the value of the requested * HTTP message header. This returns -1 if theres no HTTP header * value for the specified name. * * @param name the HTTP message header to get the value from * * @return this returns the date as a long from the header value */ public long getDate(String name) { return header.getDate(name); }
/** * This is used to acquire a cookie usiing the name of that cookie. * If the cookie exists within the HTTP header then it is returned * as a <code>Cookie</code> 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. * * @param name this is the name of the cookie object to acquire * * @return this returns a cookie object from the header or null */ public Cookie getCookie(String name) { return header.getCookie(name); }
/** * This can be used to get the major number from a HTTP version. * The major version corresponds to the major type that is the 1 * of a HTTP/1.0 version string. * * @return the major version number for the request message */ public int getMajor() { return header.getMajor(); }
/** * This is used to acquire the address from the request line. * An address is the full URI including the scheme, domain, port * and the query parts. This allows various parameters to be * acquired without having to parse the raw request target URI. * * @return this returns the address of the request line */ public Address getAddress() { return header.getAddress(); }
/** * This method returns a <code>CharSequence</code> holding the header * 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. * * @return this returns the characters consumed for the header */ public CharSequence getHeader() { return header.getHeader(); }