---
title: "返回流，浏览器直接下载"
author: "allenwei"
date: "2009-02-13T13:00:18Z"
tags: []
slug: "untitled"
draft: false
lastmod: "2009-02-13T13:00:18Z"
id: 328102
url: "https://allenwei.iteye.com/blog/328102"
---

```
response.setContentType("APPLICATION/OCTET-STREAM");
response.setHeader("Content-Disposition","attachment;   filename=\"lircd.conf\"");
response.getOutputStream().print("")
```