Package io.milton.http
Interface CompressedResource
public interface CompressedResource
This is just initial experimental design for solution to already compressed resources problem
- Author:
- brad
-
Method Summary
Modifier and TypeMethodDescriptiongetCompressedContentLength(String contentEncoding) Return the content length, if known, for the given encoding.getSupportedEncoding(String acceptableEncodings) Return the supported encoding from the list of allowable encodings from the user agent If none are supported return null.voidsendCompressedContent(String contentEncoding, OutputStream out, Range range, Map<String, String> params, String contentType)
-
Method Details
-
getSupportedEncoding
Return the supported encoding from the list of allowable encodings from the user agent If none are supported return null.- Parameters:
acceptableEncodings-- Returns:
- - null if none of the given encodings are supported, otherwise the content encoding header value to be used
-
sendCompressedContent
void sendCompressedContent(String contentEncoding, OutputStream out, Range range, Map<String, String> params, String contentType) throws IOException, NotAuthorizedException, BadRequestException, NotFoundException- Parameters:
contentEncoding- - the supported encoding returned from getSupportedEncodingout-range-params-contentType-- Throws:
IOExceptionNotAuthorizedExceptionBadRequestExceptionNotFoundException
-
getCompressedContentLength
Return the content length, if known, for the given encoding. Otherwise return null- Parameters:
contentEncoding-- Returns:
- - null, or the length of the content encoded with the given encoding
-