Class FileResponse
java.lang.Object
net.jonathangiles.tools.teenyhttpd.response.Response
net.jonathangiles.tools.teenyhttpd.response.FileResponse
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected FileThis method is called when the file is about to be loaded from the file system.voidwriteBody(BufferedOutputStream dataOut) Methods inherited from class net.jonathangiles.tools.teenyhttpd.response.Response
getRequest
-
Constructor Details
-
FileResponse
-
-
Method Details
-
getStatusCode
- Specified by:
getStatusCodein classResponse
-
getHeaders
- Specified by:
getHeadersin classResponse
-
writeBody
- Specified by:
writeBodyin classResponse- Throws:
IOException
-
getFile
This method is called when the file is about to be loaded from the file system. Overriding it offers the opportunity of modifying where the file is retrieved from.- Parameters:
filename- The name of the file to be loaded, relative to the webroot (or otherwise).- Returns:
- A File reference of the file being requested.
-