I have an image server implemented in javaEE, in javaFX I make an image request to the server that returns an array of bytes, with this result I create the image on the client side:
** Image in PNG format.
byte buffer[] -> image bytes retornado pelo servidor
// no javaFX
Image image = new Image(new ByteArrayInputStream(buffer));
How do I create the image from the byte array in android?
On the server I read the image as follows:
private byte[] readImage(String imageName) throws FileNotFoundException
{
File fle = new File(imageName);
FileInputStream new FileInputStream(fle);
byte buf[] = new byte[(int) fle.length()];
rea.read(buf,0,buf.length);
rea.close();
return buf;
}