Why does not in_avail() work??

Why does not streambuf::in_avail() work?
What do I need to do to use this functionality to check if there are
some
data on the stream (so that get() does not lock) ???

When I use it now, it returns 0 even if there are a lot of data on the
stream… :frowning:

Any sugestions??
-Arve