public final class HttpUtils extends Object
Modifier and Type | Field and Description |
---|---|
static String |
PATTERN_RFC1036
Date format pattern used to parse HTTP date headers in RFC 1036 format.
|
Modifier and Type | Method and Description |
---|---|
static String |
formatDate(Date date)
Formats the given date according to the RFC 1123 pattern.
|
static Date |
parseDate(String dateValue)
Parses a date value.
|
static List<NameValuePair> |
parseUrlQuery(String s,
Charset charset)
Returns a list of
NameValuePair s URI query parameters. |
static String |
toQueryFormFields(Iterable<? extends NameValuePair> parameters,
Charset charset) |
public static final String PATTERN_RFC1036
public static Date parseDate(String dateValue)
dateValue
- the date value to parsepublic static String formatDate(Date date)
date
- The date to format.PATTERN_RFC1123
public static List<NameValuePair> parseUrlQuery(String s, Charset charset)
NameValuePair
s URI query parameters.
By convention, '&'
and ';'
are accepted as parameter separators.s
- URI query component.charset
- charset to use when decoding the parameters.public static String toQueryFormFields(Iterable<? extends NameValuePair> parameters, Charset charset)
parameters
- the paramterscharset
- the charsetCopyright © 2002–2024 Gargoyle Software Inc.. All rights reserved.