Class InputLimit

java.lang.Object
org.apache.http.client.cache.InputLimit

public class InputLimit extends Object
Used to limiting the size of an incoming response body of unknown size that is optimistically being read in anticipation of caching it.
Since:
4.1
  • Constructor Summary

    Constructors
    Constructor
    Description
    InputLimit(long value)
    Create a limit for how many bytes of a response body to read.
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    Returns the current maximum limit that was set on creation.
    boolean
    Returns true if the input limit has been reached.
    void
    Used to report that the limit has been reached.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • InputLimit

      public InputLimit(long value)
      Create a limit for how many bytes of a response body to read.
      Parameters:
      value - maximum length in bytes
  • Method Details

    • getValue

      public long getValue()
      Returns the current maximum limit that was set on creation.
    • reached

      public void reached()
      Used to report that the limit has been reached.
    • isReached

      public boolean isReached()
      Returns true if the input limit has been reached.