It is impossible to say for a specific without seeing more context (for example, this method is usually called from a Grails application, for example), but the possible candidate would be MultipartFile , or rather, one of its specific implementations, such as MockMultipartFile . The properties emptyand inputStreamaccessed by the groovy code correspond to the access isEmpty()and getInputStream()bean methods of this interface.
multipart/form-data - , , request.getFile('fieldName') .