I am looking for a solution to recieve an image in webservices through my client(Android application).
I am sending an image as a string(converting image to byte array and then byte array to Base64String).While recieving at server end (in services ) i need to decode the string back to image so i am using following code.
BufferedImage img = ImageIO.read(new ByteArrayInputStream(decode));
FileOutputStream fos = new FileOutputStream(imageFile);
signature is the string recieved from client end.
imageFile is the path (in the code) to save the image in the required folder .
By above code i am recieving the blank image with some bytes(ex.7 bytes).
wanted to fetch the complete image not the bytes.
Please give some solution for the code.
Any new solutions are appreciated.