This is done by checking for the existence of a pre-compressed file, and if it exists and the client supports the encoding then the resource is returned for the pre compressed file
| Modifier and Type | Field and Description |
|---|---|
| private final Map | |
| private final ResourceManager |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public PreCompressedResourceSupplier | |
| private Resource | |
| public Resource | getResource(HttpServerExchange
The current exchange exchange, String The path to resolve path)Implements io.
|
| public PreCompressedResourceSupplier |
| encodingMap | back to summary |
|---|---|
| private final Map<String, String> encodingMap | |
| resourceManager | back to summary |
|---|---|
| private final ResourceManager resourceManager | |
| PreCompressedResourceSupplier | back to summary |
|---|---|
| public PreCompressedResourceSupplier(ResourceManager resourceManager) | |
| addEncoding | back to summary |
|---|---|
| public PreCompressedResourceSupplier addEncoding(String encoding, String extension) | |
| getEncodedResource | back to summary |
|---|---|
| private Resource getEncodedResource(final HttpServerExchange exchange, String path) throws IOException | |
| getResource | back to summary |
|---|---|
| public Resource getResource(HttpServerExchange exchange, String path) throws IOException Implements io.
| |
| removeEncoding | back to summary |
|---|---|
| public PreCompressedResourceSupplier removeEncoding(String encoding) | |