Class AbstractStreamingServlet

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void destroy()
      protected DocumentService getDocService​(javax.servlet.http.HttpSession session)
      Returns an instance of the DocumentService by the given session.
      void init()
      protected void writeContent​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.String hDoc, int element, java.lang.String filename, boolean currentRevision)
      Writes the document's content to the request's output stream.
      protected void writeContent​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.String hDoc, int element, java.lang.String filename, boolean currentRevision, boolean forceInline)
      Writes the document's content to the request's output stream.
      protected void writeContent​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.String hDoc, int element, java.lang.String filename, boolean currentRevision, long start, long size)
      Writes the document's content to the request's output stream.
      protected void writeInputStream​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.io.InputStream in, java.lang.String filename)
      Writes the given input stream to the responses output stream.
      protected void writeInputStream​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.io.InputStream in, java.lang.String filename, boolean forceInline)
      Writes the given input stream to the responses output stream.
      • Methods inherited from class javax.servlet.http.HttpServlet

        doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service
      • Methods inherited from class javax.servlet.GenericServlet

        getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AbstractStreamingServlet

        public AbstractStreamingServlet()
    • Method Detail

      • init

        public void init()
                  throws javax.servlet.ServletException
        Overrides:
        init in class javax.servlet.GenericServlet
        Throws:
        javax.servlet.ServletException
        See Also:
        GenericServlet.init()
      • destroy

        public void destroy()
        Specified by:
        destroy in interface javax.servlet.Servlet
        Overrides:
        destroy in class javax.servlet.GenericServlet
        See Also:
        GenericServlet.destroy()
      • writeContent

        protected void writeContent​(javax.servlet.http.HttpServletRequest request,
                                    javax.servlet.http.HttpServletResponse response,
                                    java.lang.String hDoc,
                                    int element,
                                    java.lang.String filename,
                                    boolean currentRevision,
                                    boolean forceInline)
                             throws java.io.IOException
        Writes the document's content to the request's output stream.
        Parameters:
        request - the request
        response - the response
        hDoc - the hdoc
        element - the element
        filename - the filename
        currentRevision - current revision
        forceInline - if true, the content-disposition header is always set to 'inline'.
        Throws:
        java.io.IOException - Signals that an I/O exception has occurred.
      • writeContent

        protected void writeContent​(javax.servlet.http.HttpServletRequest request,
                                    javax.servlet.http.HttpServletResponse response,
                                    java.lang.String hDoc,
                                    int element,
                                    java.lang.String filename,
                                    boolean currentRevision)
                             throws java.io.IOException
        Writes the document's content to the request's output stream.
        Parameters:
        request - the request
        response - the response
        hDoc - the hdoc
        element - the element
        filename - the filename
        currentRevision - current revision
        Throws:
        java.io.IOException - Signals that an I/O exception has occurred.
      • writeContent

        protected void writeContent​(javax.servlet.http.HttpServletRequest request,
                                    javax.servlet.http.HttpServletResponse response,
                                    java.lang.String hDoc,
                                    int element,
                                    java.lang.String filename,
                                    boolean currentRevision,
                                    long start,
                                    long size)
                             throws java.io.IOException
        Writes the document's content to the request's output stream.
        Parameters:
        request - the request
        response - the response
        hDoc - the hdoc
        element - the element
        filename - the filename
        currentRevision - current revision
        start - position to start at
        size - amount of data to write
        Throws:
        java.io.IOException - Signals that an I/O exception has occurred.
      • writeInputStream

        protected void writeInputStream​(javax.servlet.http.HttpServletRequest request,
                                        javax.servlet.http.HttpServletResponse response,
                                        java.io.InputStream in,
                                        java.lang.String filename,
                                        boolean forceInline)
                                 throws java.io.IOException
        Writes the given input stream to the responses output stream.
        Parameters:
        request - The HttpServletRequest.
        response - The HttpServletResponse
        in - The InputStream that holds the data to write to the output stream.
        filename - The filename of the data.
        forceInline - if true, the content-disposition header is always set to 'inline'.
        Throws:
        java.io.IOException - if an exception occurs.
      • writeInputStream

        protected void writeInputStream​(javax.servlet.http.HttpServletRequest request,
                                        javax.servlet.http.HttpServletResponse response,
                                        java.io.InputStream in,
                                        java.lang.String filename)
                                 throws java.io.IOException
        Writes the given input stream to the responses output stream.
        Parameters:
        request - The HttpServletRequest.
        response - The HttpServletResponse
        in - The InputStream that holds the data to write to the output stream.
        filename - The filename of the data.
        Throws:
        java.io.IOException - if an exception occurs.
      • getDocService

        protected DocumentService getDocService​(javax.servlet.http.HttpSession session)
        Returns an instance of the DocumentService by the given session.
        Parameters:
        session - The current session instance.
        Returns:
        an instance of the DocumentService.