Load a byte array property from a file
I'm trying to filgure out how to take a simple bean that contains a byte[] property and load it using an image file.
Here's my bean:
Code:
public class BulletinImageImpl implements BulletinImage
{
private byte[] image;
public byte[] getImage(String bulletinNumber, String page)
{
return image;
}
public void setImage(byte[] image)
{
this.image = image;
}
}
and my xml file:
Code:
<bean id="bulletinImageBusiness" class="BulletinImageImpl">
<property name="image" value="file:i/inyourfacemace.jpg"/>
</bean>
My image is in the "i" folder, not in WEB-INF. It doesn't load the file, just plugs in the bytes from the string.
Anybody know how I can make it pull the bytes out of the file?