Class sun.server.http.FileServlet
All Packages Class Hierarchy This Package Previous Next Index
Class sun.server.http.FileServlet
java.lang.Object
|
+----java.servlet.Servlet
|
+----sun.server.http.FileServlet
- public class FileServlet
- extends Servlet
Servlet for handling file GET and HEAD requests.
-
FileServlet()
- Creates a new file servlet.
-
flushCache()
- Flushes file RAM cache.
-
getServletInfo()
- Returns information about this servlet.
-
init()
- Initializes the file servlet.
-
sendResponse(ServletRequest, ServletResponse, boolean, boolean)
- Sends the response to a file GET or HEAD request back to the client.
-
service(ServletRequest, ServletResponse)
- Services a single file request from the client.
FileServlet
public FileServlet()
- Creates a new file servlet.
init
public void init()
- Initializes the file servlet.
- Overrides:
- init in class Servlet
service
public void service(ServletRequest req,
ServletResponse res) throws IOException
- Services a single file request from the client.
- Parameters:
- req - the servlet request
- res - the servlet response
- Throws: IOException
- if an I/O error has occurred
- Overrides:
- service in class Servlet
sendResponse
protected void sendResponse(ServletRequest req,
ServletResponse res,
boolean doGet,
boolean noCache) throws IOException
- Sends the response to a file GET or HEAD request back to the client.
- Parameters:
- req - the servlet request
- res - the servlet response
- doGet - true if this is a full get request
- noCache - true if cache is disabled
- Throws: IOException
- if an I/O error has occurred
getServletInfo
public String getServletInfo()
- Returns information about this servlet.
- Overrides:
- getServletInfo in class Servlet
flushCache
public void flushCache()
- Flushes file RAM cache.
All Packages Class Hierarchy This Package Previous Next Index