Set content type when it is not explicitly set

I use rrd4j to generate picture and convert it to bytes array, "application/octet-stream" will make browser to download the picture which is not what i want.