public class GzipResourceEndpoint extends ResourceRestEndpoint
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
GZIP_FILE_EXTENSION
Gzip file extension.
|
resourceuri| Constructor and Description |
|---|
GzipResourceEndpoint(java.lang.String uri,
java.lang.String resource)
Creates a static gzip resource end-point that responds to given URI and serves given resource.
|
GzipResourceEndpoint(java.lang.String uri,
java.lang.String resource,
java.lang.String mimetype)
Creates a static gzip resource end-point that responds to given URI and serves given resource.
|
| Modifier and Type | Method and Description |
|---|---|
protected HTTPResponse |
getResourceResponse()
Gets the resource to serve as an HTTP response.
|
get, getMimetype, getResourceAsStream, setMimetypepublic static final java.lang.String GZIP_FILE_EXTENSION
public GzipResourceEndpoint(java.lang.String uri,
java.lang.String resource)
uri - the end-point URI, cannot be null.resource - the GZip to serve, cannot be null.public GzipResourceEndpoint(java.lang.String uri,
java.lang.String resource,
java.lang.String mimetype)
uri - the end-point URI, cannot be null.resource - the GZip to serve, cannot be null.mimetype - the mime type of the resource, if null, the mimetype will be computed.MIMEUtils.getMIMEType(String)protected HTTPResponse getResourceResponse()
ResourceRestEndpointapplication/octet-stream content type.getResourceResponse in class ResourceRestEndpointMIMEUtils.MIME_DEFAULT_BINARY