一个下载路径,java如何能得到里面的文件名

比如下面的路径
http://sj.skycn.com/down.php?id=19343
对应的文件名为KQQ2008_Final_signed_java2.0.jar
但是java如何得到这个文件名呢?

[code="java"]
String urlString = "http://sj.skycn.com/down.php?id=19343";
URL url = new URL(urlString);
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
if (conn.getResponseCode() == 200) {
String file = conn.getURL().getFile();
System.out.println(file.substring(file.lastIndexOf('/')+1));
}
[/code]

不太清楚你说的意思。如果你都 能够用输入流关联到要下载的文件,为什么不能得到它的文件名啊?