Class MultipartEntityPartReader

  • All Implemented Interfaces:
    jakarta.ws.rs.ext.MessageBodyReader<List<jakarta.ws.rs.core.EntityPart>>

    @Provider
    @Consumes("multipart/form-data")
    public class MultipartEntityPartReader
    extends Object
    implements jakarta.ws.rs.ext.MessageBodyReader<List<jakarta.ws.rs.core.EntityPart>>
    A MessageBodyReader for reading multipart/form-data into a collection of entity parts.
    Since:
    6.1
    Author:
    James R. Perkins
    • Constructor Detail

      • MultipartEntityPartReader

        public MultipartEntityPartReader()
    • Method Detail

      • isReadable

        public boolean isReadable​(Class<?> type,
                                  Type genericType,
                                  Annotation[] annotations,
                                  jakarta.ws.rs.core.MediaType mediaType)
        Specified by:
        isReadable in interface jakarta.ws.rs.ext.MessageBodyReader<List<jakarta.ws.rs.core.EntityPart>>
      • readFrom

        public List<jakarta.ws.rs.core.EntityPart> readFrom​(Class<List<jakarta.ws.rs.core.EntityPart>> type,
                                                            Type genericType,
                                                            Annotation[] annotations,
                                                            jakarta.ws.rs.core.MediaType mediaType,
                                                            jakarta.ws.rs.core.MultivaluedMap<String,​String> httpHeaders,
                                                            InputStream entityStream)
                                                     throws IOException,
                                                            jakarta.ws.rs.WebApplicationException
        Specified by:
        readFrom in interface jakarta.ws.rs.ext.MessageBodyReader<List<jakarta.ws.rs.core.EntityPart>>
        Throws:
        IOException
        jakarta.ws.rs.WebApplicationException