Java: parse content-dispositions filename

  Kiến thức lập trình

I have the content-disposition of a MIME-part.

Content-Disposition: attachment; filename=msg123.xml; name=msg123.xml

Is there a java class that is able to parse that for me and give me the filename?

Or do I need to do it by myself with a regexp?

I think it is not that easy as it seems at the 1st glance (with our without “, ; or not, different attributes, …).

LEAVE A COMMENT