Add constants for mimetypes.

It would be very helpful for java users if it is allowed to use mimetype constants.