implemented setContentStream, appendContentStream, better mime type handling