Class sun.server.http.FileServlet
All Packages Class Hierarchy This Package Previous Next Index
Class sun.server.http.FileServlet
java.lang.Object
|
+----java.servlet.GenericServlet
|
+----java.servlet.http.HttpServlet
|
+----sun.server.http.FileServlet
- public class FileServlet
- extends HttpServlet
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(ServletStub)
- Initializes the file servlet.
-
sendResponse(HttpServletRequest, HttpServletResponse, boolean, boolean)
- Sends the response to a file GET or HEAD request back to the client.
-
service(HttpServletRequest, HttpServletResponse)
- Services a single file request from the client.
FileServlet
public FileServlet()
- Creates a new file servlet.
init
public void init(ServletStub stub) throws ServletException
- Initializes the file servlet.
- Overrides:
- init in class GenericServlet
service
public void service(HttpServletRequest req,
HttpServletResponse res) throws ServletException, 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 HttpServlet
sendResponse
protected void sendResponse(HttpServletRequest req,
HttpServletResponse 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 GenericServlet
flushCache
public void flushCache()
- Flushes file RAM cache.
All Packages Class Hierarchy This Package Previous Next Index