Package com.io7m.idstore.server.internal

# Class IdRequestLimits

java.lang.Object
com.io7m.idstore.server.internal.IdRequestLimits

All Implemented Interfaces:
  `IdServiceType`

public final class IdRequestLimits extends Object implements IdServiceType
Methods to handle request size limits.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `IdRequestLimits(IdServerStrings inStrings)`
  Methods to handle request size limits.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `InputStream`
  `boundedMaximumInput(jakarta.servlet.http.HttpServletRequest request, int maximum)`
  Bound the given servlet request to the given maximum size, raising an exception if the incoming Content-Length is larger than this size.
  `String`
  `description()`
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### IdRequestLimits

    public IdRequestLimits(IdServerStrings inStrings)
    Methods to handle request size limits.
    Parameters:
      `inStrings` - Server string resources

- ## Method Details

  - ### boundedMaximumInput

    public InputStream boundedMaximumInput(jakarta.servlet.http.HttpServletRequest request, int maximum) throws IOException, IdHTTPErrorStatusException
    Bound the given servlet request to the given maximum size, raising an exception if the incoming Content-Length is larger than this size.
    Parameters:
      `request` - The request
      `maximum` - The maximum size
    Returns:
      A bounded input stream
    Throws:
      `IOException` - On errors
      `IdHTTPErrorStatusException` - On errors

  - ### description

    public String description()
    Specified by:
      `description` in interface `IdServiceType`
    Returns:
      The service description

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`