public interface StaticContent extends Content
This interface exposes a File object, as opposed to a stream for example, so that the Grizzly adapter that actually serves the content can use sendFile for efficiency.
Content.Adapter, Content.State| Modifier and Type | Method and Description |
|---|---|
File |
file()
Returns a File object for the content.
|
void |
process(String relativeURIString,
org.glassfish.grizzly.http.server.Request gReq,
org.glassfish.grizzly.http.server.Response gResp)
Process the static content, adding the correct data to the response.
|
File file() throws IOException
IOExceptionvoid process(String relativeURIString, org.glassfish.grizzly.http.server.Request gReq, org.glassfish.grizzly.http.server.Response gResp) throws Exception
relativeURIString - URI path by which the content was addressedgReq - the requestgResp - the responseExceptionCopyright © 2017. All rights reserved.