Package ecar.bean

Examples of ecar.bean.DownloadArquivoBean


      String classeInstanciada = request.getParameter("classeInstanciada");
      Long id = new Long(request.getParameter("idObjeto"));
      try {
        IActionRequest action = (IActionRequest) Class.forName(classeInstanciada).newInstance();
        DownloadArquivoBean bean = action.consultarArquivoDownload(id);
        response.setContentType("inline/download")
        String arquivo = "attachment;filename=" + bean.getNomeArquivo()
        response.setHeader("Content-Disposition", arquivo)
        ServletOutputStream servletOutputStream = response.getOutputStream()
        servletOutputStream.write(bean.getConteudoArquivo())
        servletOutputStream.flush()
        servletOutputStream.close()
    } catch (IOException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
View Full Code Here


import ecar.util.Dominios;

public class ActionIntercambioDados implements IActionRequest {

  public DownloadArquivoBean consultarArquivoDownload(Long id) {
    DownloadArquivoBean downloadArquivoBean = null;
    try {
      LogIntercambioDadosDao logIntercambioDadosDao = new LogIntercambioDadosDao();
      LogIntercambioDadosLid logIntercambioDadosLid = (LogIntercambioDadosLid) logIntercambioDadosDao.buscar(LogIntercambioDadosLid.class, id);
      downloadArquivoBean = new DownloadArquivoBean(logIntercambioDadosLid.getDadosTecnologia().getNomeArquivoDtlid(), logIntercambioDadosLid.getConteudoLid().getBytes(Dominios.ENCODING_DEFAULT));
    } catch (ECARException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    } catch (UnsupportedEncodingException e) {
      // TODO Auto-generated catch block
View Full Code Here

TOP

Related Classes of ecar.bean.DownloadArquivoBean

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.