I want to create a Java File object in memory (without creating a physical file) and populate its content with a byte array.
Can this be done?
T
Maybe its worth trying a different overload of the method:
addInline(String contentId,
InputStreamSource inputStreamSource,
String contentType)
I.e.:
addInline("cImage",
new InputStreamSource ()
{
final private InputStream src =
new ByteArrayInputStream(imageByteArr);
public InputStream getInputStream() {return src;}
},
"image/jpeg"); // or whatever image type you use