Determines how many bytes are remaining in the current context.
515870
def remaining(self):
        """"""
        if self.depth == 0:
            return _STREAM_REMAINING
        return self.limit - self.queue.position
1283247
public final int getRemaining()
    {
        int rem = 0;
        for (int ii=0;ii<length;ii++)
        {
            rem += srcs[offset+ii].remaining();
        }
        return rem;
    }
206256
public function remainingBytes(): int
    {
        /** @var array $stat */
        $stat = \fstat($this->fp);
        /** @var int $pos */
        $pos = \ftell($this->fp);
        return (int) (
            PHP_INT_MAX & (
                (int) $stat['size'] - $pos
            )
        );
    }
1178851
@Override
    public boolean hasRemaining() {
        if (isFCEnabled()) {
            int remaining = this.fcLimit - position();
            if (remaining < 0) {
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                    Tr.debug(tc, "hasRmeaining, less than 0");
                }
                RuntimeException rte = new RuntimeException("FCWsByteBufferImpl.hasRemaining(): value is less than 0");
                FFDCFilter.processException(rte, CLASS_NAME + ".hasRemaining()", "1115", this);
                throw rte;
            }
            return (remaining > 0);
        }
        return super.hasRemaining();
    }
634908
public int numChars() {
		ensureMaterialized();
		if (inFirstSegment()) {
			int len = 0;
			for (int i = 0; i < sizeInBytes; i += numBytesForFirstByte(getByteOneSegment(i))) {
				len++;
			}
			return len;
		} else {
			return numCharsSlow();
		}
	}
1231583
def chunk_count(self):
        """"""
        c = 0
        for r in self.iter_regions():
            c += r.chunk_count()
        return c
698387
protected int getContentLength(boolean update) {            
      if (update){
              contentLength = (int) this.getFileSize(update);
              return contentLength;
      } else {
              if (contentLength==-1){
                      contentLength = (int) this.getFileSize(update);
              return contentLength;
              }
              else {
                      return contentLength;
              }
      }
  }
256730
public static long current(Context context, String tag) {
        Long appRxValue = sReceivedBytes.get(tag);
        Long appTxValue = sSendBytes.get(tag);
        if (appRxValue == null || appTxValue == null) {
            if (DEBUG) {
                LogUtils.w(TAG, "current() appRxValue or appTxValue is null.");
            }
            return 0;
        }
        final int uid = getUid(context);
        long appRxValue2 = TrafficStats.getUidRxBytes(uid);
        long appTxValue2 = TrafficStats.getUidTxBytes(uid);
        long rxValue = appRxValue2 - appRxValue;
        long txValue = appTxValue2 - appTxValue;
        if (DEBUG) {
            LogUtils.v(TAG, "current() rxValue=" + rxValue / 1000 + " txValue=" + txValue / 1000 + " uid=" + uid);
        }
        return rxValue;

    }
865391
def size(self):
        """"""
        old = self.__file.tell()        # old position

        self.__file.seek(0, 2)          # end of file
        n_bytes = self.__file.tell()    # file size in bytes

        self.__file.seek(old)           # back to old position

        return n_bytes
1207259
private void fetchIfNeeded(long remainingBytes)
  {
    if ((fetchFutures.isEmpty() || fetchFutures.peekLast().isDone())
        && remainingBytes <= prefetchConfig.getPrefetchTriggerBytes()) {
      Future<Void> fetchFuture = fetchExecutor.submit(() -> {
        fetch();
        return null;
      });
      fetchFutures.add(fetchFuture);
    }
  }
217876
public long getMemoryUsageBytes() {
    long total = 0;
    for (int i = 0; i < maps_.length; i++) {
      if (maps_[i] != null) {
        total += maps_[i].getMemoryUsageBytes();
      }
    }
    return total;
  }
1156517
def request_length(self):
        
        remainder = self.stop_at - self.offset
        return self.chunk_size if remainder > self.chunk_size else remainder
1127232
private final synchronized boolean _decrementTotal(int sizeInBytes)
    {
        boolean doCallback = false;

        // Decrement the count before we check for the watermark being reached
        // (510343)
        _countTotal--;
        if (_watermarkCountLow == _countTotal)
        {
            // guaranteed to go below....
            doCallback = true;
        }

        boolean wasAboveLowLimit = (_countTotalBytes >= _watermarkBytesLow);

        _countTotalBytes = _countTotalBytes - sizeInBytes;

        if (wasAboveLowLimit && _countTotalBytes < _watermarkBytesLow)
        {
            doCallback = true;
        }

        return doCallback;
    }
345270
def step_impl03(context):
    
    assert len(context.buf) == len(context.fuzzed_buf)
    count = number_of_modified_bytes(context.buf, context.fuzzed_buf)
    assert count < 3
    assert count >= 0
978908
public int getPreviousRemaining() {
        int remaining = mPrevRemaining;
        if (remaining < 0) {
            mPrevRemaining = remaining =
                ((mPrev == null) ? 0 : (mPrev.getPreviousRemaining() + 1));
        }
        return remaining;
    }
1028107
def _decr_remaining(self):
        
        assert self._remaining > 0
        self._remaining -= 1
        if not self._remaining:
            self._cdata = None
            return True
1024965
def get_remainder(self):
        
        position = self.packet.tell()
        remainder = self.packet.read()
        self.packet.seek(position)
        return remainder