class MultipartFormDataEntityProvider implements EntityProvider<Iterator<FileItem>> {

    @Override
    public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType) {
        if (type == Iterator.class) {
            if (genericType instanceof ParameterizedType) {
                ParameterizedType parameterizedType = (ParameterizedType)genericType;
                Type[] actualTypeArguments = parameterizedType.getActualTypeArguments();
                return actualTypeArguments.length == 1 && actualTypeArguments[0] == FileItem.class;
            }
        }
        return false;
    }

    public  MultipartFormDataEntityProvider(@Context HttpServletRequest httpRequest);

}