DownloadBinaryServlet Class

com.bea.content.manager.servlets
DownloadBinaryServlet Class

public class DownloadBinaryServlet

    extends HttpServlet

Hierarchy
Object
  GenericServlet
    HttpServlet
      DownloadBinaryServlet
All Implemented Interfaces

Serializable, Servlet, ServletConfig

Constructor Summary

DownloadBinaryServlet()

 

Method Summary

protected void
doGet(HttpServletRequest request, HttpServletResponse response)
protected void
downloadBinary(HttpServletRequest request, HttpServletResponse response)
Downloads the bytes of a binary property for a Node specified in the request and provides a dialog box for users to save to their file system.
protected void
showError(String error, Throwable ex, HttpServletResponse resp)
 
Methods from  javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service
 
Methods from  javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log, service
 
Methods from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
   
Methods from interface javax.servlet.Servlet
destroy, getServletConfig, getServletInfo, init, service
 
Methods from interface javax.servlet.ServletConfig
getInitParameter, getInitParameterNames, getServletContext, getServletName
 

Constructor Detail

DownloadBinaryServlet

public DownloadBinaryServlet()
 

Method Detail

doGet(HttpServletRequest, HttpServletResponse) Method

protected void doGet(HttpServletRequest request, 
                     HttpServletResponse response)
throws ServletException, IOException
Overrides
HttpServlet.doGet(HttpServletRequest, HttpServletResponse)

Exceptions

ServletException
IOException

downloadBinary(HttpServletRequest, HttpServletResponse) Method

protected void downloadBinary(HttpServletRequest request, 
                              HttpServletResponse response)
throws ServletException, RepositoryException, IOException
Downloads the bytes of a binary property for a Node specified in the request and provides a dialog box for users to save to their file system.

This will not print any error messages to the response.

Exceptions

ServletException
thrown if there was an error processing the request or response.
RepositoryException
thrown on an error talking to the repository or the Node doesn't have a content property to display.
IOException
thrown on an error downloading and reading bytes.

showError(String, Throwable, HttpServletResponse) Method

protected void showError(String error, 
                         Throwable ex, 
                         HttpServletResponse resp)
throws ServletException, IOException

Exceptions

ServletException
IOException