code: public synchronized int available()
          throws IOException
      {
          int in_stream=in.available();
          if (_byteLimit>=0 && in_stream>_byteLimit)
              in_stream=_byteLimit;
          
          return _avail - _pos + in_stream;
      }
docs: /* ------------------------------------------------------------