Interface ReadablePart
- All Superinterfaces:
ReadableEntity
A single part of a multipart message.
-
Method Summary
Methods inherited from interface ReadableEntity
as, as, asOptional, asOptional, buffer, consume, consumed, copy, hasEntity, inputStreamModifier and TypeMethodDescription<T> Tas(GenericType<T> type) Get the entity as a specific type.default <T> TGet the entity as a specific class.<T> Optional<T> asOptional(GenericType<T> type) Get the entity as a specific type (optional).default <T> Optional<T> asOptional(Class<T> type) Get the entity as a specific class (optional).default voidbuffer()If called beforeReadableEntity.inputStream(), it will buffer the entity and support multiple calls toReadableEntity.inputStream()after that.default voidconsume()Consume the entity if not yet consumed.booleanconsumed()Whether this entity has been consumed already.Copy this entity and add a new runnable to be executed after this entity is consumed.booleanWhether an entity actually exists.Input stream to read bytes of the entity.
-
Method Details
-
name
-
fileName
File name of this part if defined in partContent-Disposition.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
-
partHeaders
-