This information is contained in the response header. A bit of parsing ifis required:
String fileName = 'default name';
Pattern p = Pattern.compile('.+filename="(.+?)".*');
String contentDisposition = res.getHeader('Content-Disposition');
if(contentDisposition != null) {
Matcher m = p.matcher(contentDisposition);
if(m.find()) {
fileName = m.group(1);
}
}