Interface ReadablePart

All Superinterfaces:
ReadableEntity

public interface ReadablePart extends ReadableEntity
A single part of a multipart message. When read from an HTTP entity, each materializing conversion inherits that entity's max-buffered-entity-size limit independently. The limit counts decoded input bytes consumed by the conversion, not the combined size of all parts or the resulting object's heap usage. Direct ReadableEntity.inputStream() access and media readers that declare streaming behavior remain unrestricted by this limit. A configured request max-payload-size still applies to the entire payload.
  • Method Details

    • name

      String name()
      Name of this multipart part. Non-ASCII Content-Disposition parameters are decoded as UTF-8 when valid; otherwise, their original single-byte representation is preserved.
      Returns:
      param name
    • fileName

      Optional<String> fileName()
      File name of this part if defined in part Content-Disposition. Raw non-ASCII parameters are decoded as UTF-8 when valid; otherwise, their original single-byte representation is preserved.

      The returned filename is percent-decoded and contains only the final path segment. Invalid filenames, such as an empty segment, ., .., or names containing control characters, are rejected.

      Returns:
      file name if defined
      Throws:
      IllegalArgumentException - if the filename is malformed or unsafe
    • contentType

      HttpMediaType contentType()
      Content type of this multipart part.
      Returns:
      HTTP content type
    • partHeaders

      Headers partHeaders()
      Headers of this part.
      Returns:
      headers