Hi, Use org.apache.wicket.core.util.resource.PackageResourceStream directly instead of using ResourceReference
On Thu, May 2, 2013 at 5:50 PM, smallufo <[email protected]> wrote: > In wicket 1.4 > I can get InputStream from a ResourceReference : > > ResourceReference resRef = new ResourceReference(Page.class , "xxx.png"); > InputStream is = resRef.getResource().getResourceStream().getInputStream(); > > But it seems invalid in wicket 6 > > I need to build a DynamicImageResource , which returns byte[] in > getImageData() > ResourceReference resRef = new PackageResourceReference(Page.class , > "xxx.png"); > (in fact , the true resRef depends on the attributes parameter) > > but I am stuck here. > I find no way to get InputStream of resRef , so I cannot transform > InputStream to byte[]. > > Any solutions ? > > Thanks ! > -- Martin Grigorov Wicket Training & Consulting http://jWeekend.com <http://jweekend.com/>
