[jcifs] sample app
jpl
ouiouinonnon at yahoo.fr
Thu Feb 22 11:23:25 GMT 2007
Hello,
Just download jCIFS and tried the snippet found in the documentation.
It is not very helpful: it is even not accurate since the signature of
SMBFileInputStream is wrong.
The documentation could benefit from a simple "sample app that tell you how it
works for the easiest case". It could even be displayed on the homepage.
Does this exist somewhere in the doc/faq/list?
What I would find useful is something like:
import jcifs.*
public class foo {
final String DOMAIN = "domain";
final String USERNAME = "username";
final String PASSWORD = "password";
final String HOST = "host";
...
public static void main(String[] args) throws Exception {
// authenticates to DOMAIN
...
// connects to HOST
...
// list content of root directory of some share drive
...
// read some file of some share drive
...
// check that credentials allow to read this resource
...
// close everything and quit nicely
...
}
}
Thanks for your help.
jpl
More information about the jcifs
mailing list