Why do I get the UnsupportedDataTypeException when I invoke getContent() on a bodypart?
getContent() method returns a Java object that represents the bodypart content. For this to work, a JAF DataContentHandler corresponding to the content’s MIME type must be registered. Otherwise, the UnsupportedDataTypeException will be thrown. In this case, you can use the getInputStream() method to retrieve the content as a stream of bytes. See the JAF docs for details on how to create and register your own DataContentHandlers.
Related Questions
- Why do I get the UnsupportedEncodingException when I invoke getContent() on a bodypart that contains text data?
- What persons are able to invoke the provisions regarding the subsequent immigration of their families?
- Why do I get the UnsupportedDataTypeException when I invoke getContent() on a bodypart?