[jcifs] NullPointerException]

Eric eglass1 at comcast.net
Sat Jun 5 00:09:43 GMT 2004


> 
> I don't think we can do that. At least not consistently. Many of the
> SmbFile constructors call the java.net.URL constructor in a way that would
> make it difficult if not impossible to intercept this condition. I could
> be wrong but I think it would probably introduce more trouble than it's
> worth.
> 

It could be done fairly easily by replacing prior to passing the string
to the URL constructor (see attached).  So you could do:

      SmbFile("\\\\server\\share\\dir\\file.txt");

or:

      SmbFile("\\\\user:password at server\\share\\");

or even "mix and match", i.e.:

      SmbFile("\\\\server\\", "share/dir/file.txt");
      SmbFile("smb://server/share/", "dir\\file.txt");

Don't know if there is any actual real demand for any of this, though.


Eric

-------------- next part --------------
A non-text attachment was scrubbed...
Name: SmbFile.java.gz
Type: application/x-gzip
Size: 18867 bytes
Desc: not available
Url : http://lists.samba.org/archive/jcifs/attachments/20040604/5c9ec4bd/SmbFile.java-0001.bin


More information about the jcifs mailing list