Create pdf through java.io
<p>I tried creating a pdf file out of another one(in my local drive) using java.io. The thing is a file with a .pdf extension got created but im unable to open the file, it says the file is already in use and most importantly the size of the file is too large and it keeps on increasing (origin file size : 5,777kB and the newly created one file size as of now is 38,567kB). Im not that much of skilled java programmer but still i would appreciate if anyone can give me an explanation ..</p>

<pre><code>String path = "D:\\priya_Docs\\Android pdfs\\Professional_Android_Application_Development.pdf";
        File file = new File(path);
        System.out.println("Located a file " + file.isFile());
        String filesArray = file.getPath();
        File getFile = file.getAbsoluteFile();
        FileInputStream fis = new FileInputStream(getFile);
        FileOutputStream fos = new FileOutputStream(
                "D:\\priya_Docs\\Androiddoc.pdf");
        for (int b = fis.read(); b != -1;) {
            fos.write(b);
        }
</code></pre>
