Class ReadableBodyPart

  • All Implemented Interfaces:

    public final class ReadableBodyPart
    extends Object
    implements BodyPart
    Readable body part entity.
    • Method Detail

      • drain

        public void drain()
        Release all chunks and complete publisher of part's content.
      • as

        public <T> T as​(Class<T> clazz)
        Converts the part content into an instance of the requested type. This method can only be used if the part content is buffered!, see isBuffered().
        Type Parameters:
        T - the requested type
        clazz - the requested type class
        T the converted content
        IllegalStateException - if the part is not buffered or if an error occurs while converting the content