How should I use spartan image

Hi I would like to know how I use the image of spartan API that sends me because Java is as text, haog to convert it to an image file , thanks for your time and please excuse my English

The headers from the response contain the URL to the image. You can then use your method of choice to handle this.