[jcifs] Package access classes, methods, etc.

Michael B Allen mba2000 at ioplex.com
Fri Jul 16 20:31:52 GMT 2004


David D. Kilzer said:
> Speaking of make methods public, what is the proper way to close or
> disconnect when using a named pipe?  The SmbFile.close() method is
> package-private (not public, protected or private), and there is no
> corresponding disconnect() method for the public connect() method.

An SmbFile is not a stream that can be opened or closed. That is a concept
popularized by simpler file APIs such as the C's fopen.
SmbFileOutputStream, SmbFileInputStream, and the streams returned by
SmbFileNamedPipe.getXxxputStream do have close methods that will the
"file".

> It would be nice if SmbFile.isConnected() was public as well, at least
> in the case of a named pipe.

If someone provides a suitable use-case for a change then we will make
that change. Otherwise I try to supress changes to the API that aren't
really necessary or do not provide a significant level of convienence.

Mike


More information about the jcifs mailing list