public class HttpHeaderUtils extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
HttpHeaderUtils.HttpResource
A resource that has been requested by an
HttpServletRequest and eventually needs to be updated |
Modifier and Type | Field and Description |
---|---|
protected static org.apache.commons.lang3.time.FastDateFormat |
HTTP_DATE |
Constructor and Description |
---|
HttpHeaderUtils() |
Modifier and Type | Method and Description |
---|---|
static byte[] |
handleModifiedHeaders(HttpServletRequest servletRequest,
HttpServletResponse servletResponse,
HttpHeaderUtils.HttpResource resource,
boolean output)
Handles the "Last-Modified" and
"If-Modified-Since" headers for the give request/response pair.
|
protected static final org.apache.commons.lang3.time.FastDateFormat HTTP_DATE
public static byte[] handleModifiedHeaders(HttpServletRequest servletRequest, HttpServletResponse servletResponse, HttpHeaderUtils.HttpResource resource, boolean output) throws IOException
servletRequest
- the current HttpServletRequest
servletResponse
- the current HttpServletResponse
resource
- the HttpHeaderUtils.HttpResource
to processoutput
- whether or not to write the response data to the OutputStream
of the
HttpServletResponse
, also setting the content-type and content lengthHttpHeaderUtils.HttpResource
has'nt been updated since thenIOException
- if an error occurred while reading/updating the HttpHeaderUtils.HttpResource
Copyright © 2011–2017 aiticon GmbH. All rights reserved.