public static class WebServerDispatcher.Resource extends Object
WebServerDispatcher.| Modifier and Type | Class | Description |
|---|---|---|
static class |
WebServerDispatcher.Resource.Builder |
Builder for
WebServerDispatcher.Resource. |
| Modifier and Type | Field | Description |
|---|---|---|
static int |
GZIP_SUPPORT_DISABLED |
The server doesn't support gzip.
|
static int |
GZIP_SUPPORT_ENABLED |
The server supports gzip.
|
static int |
GZIP_SUPPORT_FORCED |
The server supports gzip.
|
| Modifier and Type | Method | Description |
|---|---|---|
WebServerDispatcher.Resource.Builder |
buildUpon() |
Returns a new
WebServerDispatcher.Resource.Builder initialized with the values from this instance. |
byte[] |
getData() |
Returns the data served by this resource.
|
int |
getGzipSupport() |
Returns the level of gzip support the server should provide for this resource.
|
String |
getPath() |
Returns the path this resource is available at.
|
boolean |
resolvesToUnknownLength() |
Returns true if the resource should resolve to an unknown length.
|
boolean |
supportsRangeRequests() |
Returns true if RFC 7233 range requests should be supported for this resource.
|
public static final int GZIP_SUPPORT_DISABLED
public static final int GZIP_SUPPORT_ENABLED
Accept-Encoding header.public static final int GZIP_SUPPORT_FORCED
Accept-Encoding header or one that accepts "gzip".
RFC 2616 14.3 recommends a server use "identity" content-coding if no
Accept-Encoding is present, but some servers will still compress responses in this case.
This option mimics that behaviour.
public String getPath()
public byte[] getData()
public boolean supportsRangeRequests()
public boolean resolvesToUnknownLength()
@GzipSupport public int getGzipSupport()
public WebServerDispatcher.Resource.Builder buildUpon()
WebServerDispatcher.Resource.Builder initialized with the values from this instance.