Thanks for posting the working code, Noner. Just one comment: if you are using Java 7 or later (and surely you must be) then you could simplify it by using the Files.copy(InputStream, Path) method from the java.nio.file package. You would replace the code which copies the data from SMB to Windows by a single line of code calling the static Files.copy method.
Also if you look at the API documentation for Files.copy, the detailed description of the method contains an example which shows how to use the try-with-resources feature. That would make your finally-clause (with all of the annoying null tests) unnecessary as well, so your code would look much simpler.