ResourceSupplierpublic class PreCompressedResourceSupplier extends java.lang.Object implements ResourceSupplier
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
| Constructor | Description |
|---|---|
PreCompressedResourceSupplier(ResourceManager resourceManager) |
| Modifier and Type | Method | Description |
|---|---|---|
PreCompressedResourceSupplier |
addEncoding(java.lang.String encoding,
java.lang.String extension) |
|
Resource |
getResource(HttpServerExchange exchange,
java.lang.String path) |
|
PreCompressedResourceSupplier |
removeEncoding(java.lang.String encoding) |
public PreCompressedResourceSupplier(ResourceManager resourceManager)
public Resource getResource(HttpServerExchange exchange, java.lang.String path) throws java.io.IOException
getResource in interface ResourceSupplierexchange - The current exchangepath - The path to resolvejava.io.IOException - if an error ocured resolving the resourcepublic PreCompressedResourceSupplier addEncoding(java.lang.String encoding, java.lang.String extension)
public PreCompressedResourceSupplier removeEncoding(java.lang.String encoding)
Copyright © 2018. All rights reserved.