Response 下载文件 怎么取得默认路径

代码如下:

response.setContentType(contentType);

response.setHeader("Content-disposition", "attachment; filename="

  • new String(realName.getBytes("utf-8"), "ISO8859-1"));

response.setHeader("Content-Length", String.valueOf(fileLength));

bis = new BufferedInputStream(new FileInputStream(downLoadPath));

bos = new BufferedOutputStream(response.getOutputStream());

byte[] buff = new byte[2048];

int bytesRead;

while (-1 != (bytesRead = bis.read(buff, 0, buff.length))) {

bos.write(buff, 0, bytesRead);

}

bis.close();

bos.close();

此方法可直接下载文件到客户端,但是我现在不知道改怎样获取 下载到了客户端的什么位置。

我现在不需要设置路径。只需要取得默认下载到的路径。