"Password-protected" only means something for a file format if that file format provides a way to provide a password and prompt for it. So general questions like that are useless.
It's possible, for example, that iText provides a way to password-protect a PDF file. (If PDF even supports such a thing, which I don't know.) But you'd have to look in the iText documentation for that. And of course iText wouldn't be able to password-protect a MS Word file (again, if such a thing is even possible). [ October 31, 2007: Message edited by: Paul Clapham ]
Joined: Mar 22, 2005
Paul is good at guessing
PDF, DOC and XLS all support password-protection, but like he said, that's something inherent in the format, not something that can be added via a Java API.
While it's possible to write a Java ZIP package that supports passwords like the ones WinZip/PKZIP use, I'm not aware that any of the existing ones do.
(Just for completeness sake - yes, iText can handle PDF passwords).
Joined: Oct 17, 2006
Ok so I'll just have java run WinZip from command line to create a zip with password...