Class FileSender


  • public class FileSender
    extends Object
    Cass that sends data with headers.
    • Constructor Summary

      Constructors 
      Constructor Description
      FileSender​(com.google.apphosting.utils.config.AppYaml appYaml)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean checkIfUnmodified​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.eclipse.jetty.util.resource.Resource resource)
      Check the headers to see if content needs to be sent.
      void sendData​(javax.servlet.ServletContext servletContext, javax.servlet.http.HttpServletResponse response, boolean include, org.eclipse.jetty.util.resource.Resource resource, String urlPath)
      Writes or includes the specified resource.
    • Constructor Detail

      • FileSender

        public FileSender​(com.google.apphosting.utils.config.AppYaml appYaml)
    • Method Detail

      • sendData

        public void sendData​(javax.servlet.ServletContext servletContext,
                             javax.servlet.http.HttpServletResponse response,
                             boolean include,
                             org.eclipse.jetty.util.resource.Resource resource,
                             String urlPath)
                      throws IOException
        Writes or includes the specified resource.
        Throws:
        IOException
      • checkIfUnmodified

        public boolean checkIfUnmodified​(javax.servlet.http.HttpServletRequest request,
                                         javax.servlet.http.HttpServletResponse response,
                                         org.eclipse.jetty.util.resource.Resource resource)
                                  throws IOException
        Check the headers to see if content needs to be sent.
        Returns:
        true if the content is sent, false otherwise.
        Throws:
        IOException