Search code examples
javajcifs

Is it possible to use JCFIS without registering a protocol handler for "smb"?


I have not had much luck in finding a direct answer, but i do hope to get round to trying jcfis in a few days time.

For those that are interested, and in the interest of completeness, JCFIS is a library for reading/writing files and directories across a network using java.

http://jcifs.samba.org


Solution

  • Not sure what you mean by having to register a protocol handler to be able to use it. However, all you need to do to access files on a samba share is to use SmbFile. You can access the InputStream of any SmbFile using the getInputStream() method. In many ways it works just as any File object, and it is fairly straightforward to use. Authentication is done via the SmbFile's constructor. To answer your question : you do not need to register a protocol handler to be able to access files on a samba share using JCifs.