@SuppressWarnings("unchecked")
public List<FileItem> readFrom(Class<List<FileItem>> type,
Type genericType, Annotation[] annotations, MediaType mediaType,
final MultivaluedMap<String, String> respHeaders,
final InputStream entityStream) throws IOException {
final FileUpload rfu = new FileUpload();
final RequestContext requCtx = new RequestContext(entityStream,
respHeaders);
try {
return rfu.parseRequest(requCtx);
} catch (FileUploadException e) {
if (e.getCause() instanceof IOException) {
throw (IOException) e.getCause();
}
final IOException ioExc = new IOException(