I am trying to retrieve a blob(2) from my newly created embedded database and assign it to the image icon of a jlable (and of course save it back to the database if the image has been changed or altered).
I found the following code snippit from another site but am having probs getting it to work....
Blob blob1 = rs.getBlob("IMAGE");
IMAGE.setIcon(new ImageIcon(ByteStreams.toByteArray(blob1.getBinaryStream())));
Blob blob2 = rs.getBlob("POG");
POG.setIcon(new ImageIcon(ByteStreams.toByteArray(blob2.getBinaryStream())));
I am getting the error of cannot find symbol on ByteStreams
I know that I am missing something, ie defining the varible ByteStreams, but dont understand what is for or where/how to get the value for it.
Note: the images will vary in size from one to another.
recomendations to updating the database would be helpful as well....