Package net.officefloor.web.resource
Interface HttpFile
-
- All Superinterfaces:
HttpResource
- All Known Implementing Classes:
HttpFileImpl
public interface HttpFile extends HttpResource
HTTP file.- Author:
- Daniel Sagenschneider
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.nio.charset.CharsetgetCharset()Obtains theCharsetfor the contents.HttpHeaderValuegetContentEncoding()Obtains theContent-Encodingfor thisHttpFile.HttpHeaderValuegetContentType()Obtains theContent-Typefor thisHttpFile.voidwriteTo(HttpResponse response)Writes theHttpFileto theHttpResponse.-
Methods inherited from interface net.officefloor.web.resource.HttpResource
getPath, isExist
-
-
-
-
Method Detail
-
getContentEncoding
HttpHeaderValue getContentEncoding()
Obtains theContent-Encodingfor thisHttpFile.- Returns:
Content-Encodingfor thisHttpFile.- See Also:
ResourceTransformer
-
getContentType
HttpHeaderValue getContentType()
Obtains theContent-Typefor thisHttpFile.- Returns:
Content-Typefor thisHttpFile.- See Also:
FileTypeDetector
-
getCharset
java.nio.charset.Charset getCharset()
Obtains theCharsetfor the contents.- Returns:
Charsetornullif contents are not text or theCharsetis unknown.- See Also:
ResourceSystem,ResourceSystemContext
-
writeTo
void writeTo(HttpResponse response) throws java.io.IOException
Writes theHttpFileto theHttpResponse.- Parameters:
response-HttpResponse.- Throws:
java.io.IOException- If failure in writing theHttpFileto theHttpResponse.
-
-