Hi,

On Mon, Apr 14, 2014 at 2:03 PM, Carl-Eric Menzel <[email protected]>wrote:

> You can use a org.apache.wicket.request.resource.ByteArrayResource
> instead - It's an IResource implementation that takes a byte array. You
> can then use the resource in a DownloadLink, for example.
>

ResourceLink would be simpler.
Christoph should already know that from the previous discussion.

Also see org.apache.wicket.util.resource.AbstractResourceStream. It has few
abstract methods, one of them -
org.apache.wicket.util.resource.IResourceStream#getInputStream.
Just return ByteArrayInputStream.


>
> Carl-Eric
>
> On Mon, 14 Apr 2014 12:11:06 +0200
> <[email protected]> wrote:
>
> > Hello,
> >
> > Iam using a FileResourceStream to download a file. This needs an
> > File, which I create on the fly like this:
> >
> > tempFile = File.createTempFile("SLA", ".xls");
> >
> > InputStream data = new
> >
> ByteArrayInputStream(ConsoleDataHandlerImpl.getInstance().getReportAsByteStream(beginDate,endDate));
> > Files.writeTo(tempFile, data);
> >
> > It works fine. But the problem is that it save the tempfile in my tmp
> > folder. Is there a RessourceStream in Wicket which can handle a byte
> > array so that I don't need a tempfile?
> >
> >
> > Mit freundlichen Grüßen
> > Christoph Manig
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to