Finding an example with RESTful that returns an image
Hi, I have a method must return an image. I haven't found nothing about these.
My method is the next:
@Path("/image")
public class ImageResource {
public ImageResource() {}
@GET
@Produces({"image/jpeg,image/gif"})
public ?? getImage() {
byte[] imageReturn = null ;
try {
imageReturn = // here an image with the byte[ ] type
} catch (Exception ex) {
Logger.getLogger(ProfesoresResource.class.getName()).log(Level.SEVERE, null, ex);
}
return ?? ;
}
What is the type of "??"
Thank you so much!