Convert it to binary and write it to the response. For example, it's common to have a
servlet (or whatever back-end technology you're using) serve images by using the servlet as the source for an HTML image tag, and the servlet writes the image to the response.