Package com.saperion.ngc.servlet
Class AbstractStreamingServlet
java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
com.saperion.ngc.servlet.AbstractStreamingServlet
- All Implemented Interfaces:
- jakarta.servlet.Servlet,- jakarta.servlet.ServletConfig,- Serializable
- Direct Known Subclasses:
- SignedStreamingServlet,- StreamingServlet,- ViewDocumentServlet,- ViewTemporaryDocumentServlet
public abstract class AbstractStreamingServlet
extends jakarta.servlet.http.HttpServlet
Abstract class with common methods for streaming servlets.
- See Also:
- 
Field SummaryFields inherited from class jakarta.servlet.http.HttpServletLEGACY_DO_HEAD
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoiddestroy()protected DocumentServicegetDocService(jakarta.servlet.http.HttpSession session) Returns an instance of theDocumentServiceby the given session.voidinit()protected voidwriteContent(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, String hDoc, int element, String filename, boolean currentRevision) Writes the document's content to the request's output stream.protected voidwriteContent(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, String hDoc, int element, String filename, boolean currentRevision, boolean forceInline) Writes the document's content to the request's output stream.protected voidwriteContent(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, String hDoc, int element, String filename, boolean currentRevision, long start, long size) Writes the document's content to the request's output stream.protected voidwriteInputStream(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, InputStream in, String filename) Writes the given input stream to the responses output stream.protected voidwriteInputStream(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, InputStream in, String filename, boolean forceInline) Writes the given input stream to the responses output stream.Methods inherited from class jakarta.servlet.http.HttpServletdoDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, init, service, serviceMethods inherited from class jakarta.servlet.GenericServletgetInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, log, log
- 
Constructor Details- 
AbstractStreamingServletpublic AbstractStreamingServlet()
 
- 
- 
Method Details- 
initpublic void init() throws jakarta.servlet.ServletException- Overrides:
- initin class- jakarta.servlet.GenericServlet
- Throws:
- jakarta.servlet.ServletException
- See Also:
- 
- GenericServlet.init()
 
 
- 
destroypublic void destroy()- Specified by:
- destroyin interface- jakarta.servlet.Servlet
- Overrides:
- destroyin class- jakarta.servlet.GenericServlet
- See Also:
- 
- GenericServlet.destroy()
 
 
- 
writeContentprotected void writeContent(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, String hDoc, int element, String filename, boolean currentRevision, boolean forceInline) throws 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:
- IOException- Signals that an I/O exception has occurred.
 
- 
writeContentprotected void writeContent(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, String hDoc, int element, String filename, boolean currentRevision) throws 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:
- IOException- Signals that an I/O exception has occurred.
 
- 
writeContentprotected void writeContent(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, String hDoc, int element, String filename, boolean currentRevision, long start, long size) throws 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:
- IOException- Signals that an I/O exception has occurred.
 
- 
writeInputStreamprotected void writeInputStream(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, InputStream in, String filename, boolean forceInline) throws IOException Writes the given input stream to the responses output stream.- Parameters:
- request- The- HttpServletRequest.
- response- The- HttpServletResponse
- in- The- InputStreamthat 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:
- IOException- if an exception occurs.
 
- 
writeInputStreamprotected void writeInputStream(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, InputStream in, String filename) throws IOException Writes the given input stream to the responses output stream.- Parameters:
- request- The- HttpServletRequest.
- response- The- HttpServletResponse
- in- The- InputStreamthat holds the data to write to the output stream.
- filename- The filename of the data.
- Throws:
- IOException- if an exception occurs.
 
- 
getDocServiceReturns an instance of theDocumentServiceby the given session.- Parameters:
- session- The current session instance.
- Returns:
- an instance of the DocumentService.
 
 
-