© 2005 BEA Systems, Inc.

com.bea.content.manager.servlets
Class DownloadBinaryServlet

java.lang.Object
  extended byjavax.servlet.GenericServlet
      extended byjavax.servlet.http.HttpServlet
          extended bycom.bea.content.manager.servlets.DownloadBinaryServlet
All Implemented Interfaces:
Serializable, Servlet, ServletConfig

public class DownloadBinaryServlet
extends HttpServlet

See Also:
Serialized Form

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 inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DownloadBinaryServlet

public DownloadBinaryServlet()
Method Detail

doGet

protected void doGet(HttpServletRequest request,
                     HttpServletResponse response)
              throws ServletException,
                     IOException
Throws:
ServletException
IOException

downloadBinary

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.

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

showError

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

© 2005 BEA Systems, Inc.

Copyright © 2005 BEA Systems, Inc. All Rights Reserved