|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.adamcin.httpsig.api.RequestContent
public final class RequestContent
Object used to pass per-request context, such as Request Line and HTTP Headers in client/server implementation-independent way.
| Nested Class Summary | |
|---|---|
static class |
RequestContent.Builder
|
| Field Summary | |
|---|---|
static String |
DATE_FORMAT
Deprecated. |
static String |
DATE_FORMAT_RFC1123
|
| Method Summary | |
|---|---|
byte[] |
getContent(List<String> headers,
Charset charset)
Returns the signature content as a byte array |
String |
getContentString(List<String> headers)
Returns the signature content as a String |
String |
getDate()
|
Date |
getDateGMT()
Returns the currently set date header value converted to a Date object in the GMT time zone |
Calendar |
getDateTZ(TimeZone timeZone)
Returns the currently set date header value converted to a Calendar in the specified timeZone, or in the
default timeZone if the parameter is null |
List<String> |
getHeaderNames()
|
List<String> |
getHeaderValues(String name)
|
String |
getRequestLine()
Deprecated. |
String |
getRequestTarget()
|
String |
toString()
|
protected static Date |
tryParseDate(String date)
Sets the literal date header value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
@Deprecated public static final String DATE_FORMAT
DATE_FORMAT_RFC1123)
public static final String DATE_FORMAT_RFC1123
| Method Detail |
|---|
public byte[] getContent(List<String> headers,
Charset charset)
headers - the list of headers to be included in the signed content
getContentString(java.util.List) encoded using the provided Charsetpublic String getContentString(List<String> headers)
headers - the list of headers to be included in the signed content
public String toString()
toString in class Objectpublic List<String> getHeaderNames()
RequestContent, in the order in which they were added, except
for request-target, which is listed first if present@Deprecated public String getRequestLine()
public String getRequestTarget()
public String getDate()
public List<String> getHeaderValues(String name)
name - the name of the header
protected static Date tryParseDate(String date)
date - a date string conforming to DATE_FORMAT_RFC1123 or to the deprecated DATE_FORMAT
DATE_FORMAT_RFC1123 or to DATE_FORMATpublic Date getDateGMT()
Date object in the GMT time zone
Date object in GMT or null if header is not set or not validpublic Calendar getDateTZ(TimeZone timeZone)
Calendar in the specified timeZone, or in the
default timeZone if the parameter is null
timeZone - some time zone or null to convert to the default time zone
Calendar in the specified time zone or in the default time zone if the timeZone parameter is null
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||