Class ReadableBodyPart

  • All Implemented Interfaces:
    BodyPart

    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
        Parameters:
        clazz - the requested type class
        Returns:
        T the converted content
        Throws:
        IllegalStateException - if the part is not buffered or if an error occurs while converting the content