Package io.helidon.http.media.multipart
Interface ReadablePart
- All Superinterfaces:
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 Summary
Methods inherited from interface io.helidon.http.media.ReadableEntity
as, as, asOptional, asOptional, buffer, consume, consumed, copy, hasEntity, inputStream
-
Method Details
-
name
String name()Name of this multipart part. Non-ASCIIContent-Dispositionparameters are decoded as UTF-8 when valid; otherwise, their original single-byte representation is preserved.- Returns:
- param name
-
fileName
File name of this part if defined in partContent-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
-