The getContentType method of the Response class returns a string that describes the content type of the response that is being sent to the client.
public String getContentType();