For example when returning StreamingResolutions instead of

 final Report report..;

        return new StreamingResolution("application/pdf") {

            @Override
            protected void stream(HttpServletResponse response) throws
Exception {
                report.executePdf( response.getOutputStream());
            }

        }.setFilename("report.pdf");


It could be short, sweet and nice like this:

Report report..;

   return new StreamingResolution("application/pdf")
  .streaming(  response  -> report.executePdf(
response.getOutputStream()) )
  .setFilename("report.pdf");

Or maybe passing directly an ServletOutputStream

Report report..;

   return new StreamingResolution("application/pdf")
  .streaming(  out -> report.executePdf(  out )  )
  .setFilename("report.pdf");




2015-01-23 7:44 GMT-05:00 Nestor Hernandez <ilu...@gmail.com>:

> Hi guys, As you Java 8 is a great leap forward in the language, I was
> wondering if there is some features planned for Stripes using Java 8
> features like lambdas, method references, streams, etc.
>
------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to