How do I set up a default mime type for unknown file types using MimetypesFileTypeMap? At present when sending a message with an attached file of unknown file type a NullPointerException is thrown.

Rajesh Ajmera

Just create a new map and ask:


MimetypesFileTypeMap mmp = new MimetypesFileTypeMap();
System.out.println(mmp.getContentType("d:
ajeshlbc.jpg"));
0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact