public class GzipResourceEndpoint extends ResourceRestEndpoint
| Modifier and Type | Field and Description |
|---|---|
static String |
GZIP_FILE_EXTENSION
Gzip file extension.
|
resourceuri| Constructor and Description |
|---|
GzipResourceEndpoint(String uri,
String resource)
Creates a static gzip resource end-point that responds to given URI and serves given resource.
|
GzipResourceEndpoint(String uri,
String resource,
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, setMimetypedelete, getURI, post, putpublic static final String GZIP_FILE_EXTENSION
public GzipResourceEndpoint(String uri, String resource)
uri - the end-point URI, cannot be null.resource - the GZip to serve, cannot be null.public GzipResourceEndpoint(String uri, String resource, 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