[jcifs] jcifs-0.7.19 released

andrea.lanza at frameweb.it andrea.lanza at frameweb.it
Fri Jan 23 14:53:30 GMT 2004

Sorry, I did not explain correctly.

I developed a set of servlet classes working on tomcat 4.x
in order to navigate the intranet sbm net from the Internet, upload,
download and zip and download
files and directory and so on.
I know that probably the NetworkExplorer class does all of this thing, but
I never used that, I developed eveything
from scratch (probably becouse when I started I didn't see that
When I navigate to an url that represents a folder or a share or anything
else from a file,  I use the method listFiles() in order to see the content
of that share/folder, and everything work fine also with jcifs 0.7.18.

When I navigate to an URL tha IS a file, I use this code (sourceFile is a
SmbFile )

                SmbFileInputStream in = new SmbFileInputStream(sourceFile);
                res.setHeader("Content-Disposition","attachment; filename="
+ attributeName + httpPath + myFileName);
                out = res.getOutputStream();
                int len;
                while ((len = in.read(buffer)) != -1) {
                    out.write(buffer, 0, len);
                } // fine while

res is the response and doing this starts the download on the browser.

Actually I don't know where the problem arises with 0.7.18, perhaps when I
get the SmbFileInputStream,
 or perhaps when I read from that SmbFileInputStream.
If it is important for you to know this, I can downgrade to 0.7.18 and
debug that code snipplet.

anyway, with 0.7.19 everything is OK


More information about the jcifs mailing list