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.Charset
getCharset()
Obtains theCharset
for the contents.HttpHeaderValue
getContentEncoding()
Obtains theContent-Encoding
for thisHttpFile
.HttpHeaderValue
getContentType()
Obtains theContent-Type
for thisHttpFile
.void
writeTo(HttpResponse response)
Writes theHttpFile
to theHttpResponse
.-
Methods inherited from interface net.officefloor.web.resource.HttpResource
getPath, isExist
-
-
-
-
Method Detail
-
getContentEncoding
HttpHeaderValue getContentEncoding()
Obtains theContent-Encoding
for thisHttpFile
.- Returns:
Content-Encoding
for thisHttpFile
.- See Also:
ResourceTransformer
-
getContentType
HttpHeaderValue getContentType()
Obtains theContent-Type
for thisHttpFile
.- Returns:
Content-Type
for thisHttpFile
.- See Also:
FileTypeDetector
-
getCharset
java.nio.charset.Charset getCharset()
Obtains theCharset
for the contents.- Returns:
Charset
ornull
if contents are not text or theCharset
is unknown.- See Also:
ResourceSystem
,ResourceSystemContext
-
writeTo
void writeTo(HttpResponse response) throws java.io.IOException
Writes theHttpFile
to theHttpResponse
.- Parameters:
response
-HttpResponse
.- Throws:
java.io.IOException
- If failure in writing theHttpFile
to theHttpResponse
.
-
-