[jcifs] SmbFileInputStream implementation ?

Michael B Allen mba2000 at ioplex.com
Wed Dec 8 19:46:00 GMT 2004


On Wed, 08 Dec 2004 19:31:13 +0300
leostone <leostone at mail.ru> wrote:

> hi there,
> 
> can someone explain why the SmbFileInputStream.available() method only
> works with an underlaying SmbNamedPipe and otherwise returns 0?

Because it's unbuffered so there is no way to know how many bytes there are
to read. InputStream does the same thing. Named pipes have a command
(PeekNamdPipe) specifically for querying the data in a pipe.

> And shouldn't it be documented somehow.

Yes. Will do.

> I came across this question when using the org.apache.poi library 
> which for some reason uses the available() when reading files and as a
> result wont read anything :(

Oops!

-- 
Greedo shoots first? Not in my Star Wars.


More information about the jcifs mailing list