Results for “java stringreader inputstream string example script pdf document site:bugs.java.com”
bugs.java.com
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)