code: public ServletOutputStream getOutputStream() throws IOException {
          return new ServletOutputStream() {
              protected OutputStream proxy;
              public void write(int b) throws IOException {
                  if (proxy == null)
                      proxy = getResponse().getOutputStream();
                  proxy.write(b);
              }
              
              public void write(byte[] paramArrayOfByte, int off, int len)
                      throws IOException {
                  if (proxy == null)
                      proxy = getResponse().getOutputStream();
                  proxy.write(paramArrayOfByte, off, len);
              }
          };
      }
docs: 代理getOutputStream,真正write的时候才获取