class ListMultipartFormDataMessageBodyReader implements MessageBodyReader<List<InputItem>> {

    @Override
    public List<InputItem> readFrom(Class<List<InputItem>> type, Type genericType, Annotation[] annotations, MediaType mediaType,
                                    MultivaluedMap<String, String> httpHeaders, InputStream entityStream)
            throws IOException, WebApplicationException {
        final Type fileItemIteratorGenericType = ParameterizedTypeImpl.newParameterizedType(Iterator.class, FileItem.class);
        final MessageBodyReader<Iterator> multipartReader =
                providers.getMessageBodyReader(Iterator.class, fileItemIteratorGenericType, annotations, mediaType);
        final Iterator iterator =
                multipartReader.readFrom(Iterator.class, fileItemIteratorGenericType, annotations, mediaType, httpHeaders, entityStream);
        final List<InputItem> result = new LinkedList<>();
        while (iterator.hasNext()) {
            result.add(new DefaultInputItem((FileItem)iterator.next(), providers));
        }
        return result;
    }

    public  ListMultipartFormDataMessageBodyReader(@Context Providers providers);

}