RequestCycle.get().scheduleRequestHandlerAfterCurrent(new
ResourceRequestHandler(bar, null));

On Mon, Sep 12, 2011 at 7:20 PM, Makoto Kameda
<[email protected]> wrote:
> Hi there,
> I have a problem while migrating from 1.4 to 1.5.
> In 1.4 I have been using ByteArrayResource.getResourceStream() to download
> dynamically generated PDF and ZIP with a file name.
> Now it's removed in 1.5.
> So how can I change this code:
>
> 1.4:
> ByteArrayResource bar = new ByteArrayResource("application/pdf",
> byteout.toByteArray());
> IResourceStream stream = bar.getResourceStream();
>
> RequestCycle.get().setRequestTarget(new ResourceStreamRequestTarget(stream,
> fileName));
>
>
> 1.5;
> ByteArrayResource bar = new ByteArrayResource("application/pdf",
> byteout.toByteArray());
>
> // ?? how can I convert it to a ResourceStream ??
> IResourceStream stream = bar.getResourceStream();
>
> RequestCycle.get().scheduleRequestHandlerAfterCurrent(new
> ResourceStreamRequestHandler(stream, fileName));
>
>
> makoto
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to