A reading of JPEG Metadata Format Specification and Usage Notes seems to suggest that this is possible by writing the image with a custom IIOMetadata
.
A search on the internet brings up https://codereview.appspot.com/3082041/patch/204004/210007, which seems to use ImageIO in exactly this manner.
I haven't tried it, and have no idea if it actually works.