available

Returns an estimate of the number of bytes that can be read (or skipped over) from this InputStream without blocking, safely wrapped as a Kapacity instance.

Important Note on Java IO: This property directly delegates to InputStream.available. It represents the number of bytes currently buffered locally or immediately accessible. It does not represent the total remaining size of the stream or file. You should never use this property to allocate a buffer intended to hold the entire contents of a network stream.

Return

The estimated number of non-blocking bytes currently available, represented as Kapacity.

Throws

If an I/O error occurs while checking the underlying stream.