Bug ID: JDK-4267294 InputStream must be created in getInputStream...
If the InputStream is created in the DataSource, the InputStream can be read fine. This is probably really more of a documentation issue.InputStream pdf = new FileInputStream("myfile.pdf") ; DataSource mailds = new PdfDataSource(pdf)