b2科目四模拟试题多少题驾考考爆了怎么补救
b2科目四模拟试题多少题 驾考考爆了怎么补救

aspnet responsewrite乱码_responsebody返回json_框架设response乱码(11)

电脑杂谈  发布时间:2017-03-10 09:15:41  来源:网络整理

javax.servlet

Intece ServletResponse

All Known Subinteces:

HttpServletResponse

All Known Implementing Classes:

HttpServletResponseWrapper, ServletResponseWrapper

2.ServletResponse的API

1)java.lang.String getCharacterEncoding()

Returns the name of the character encoding (MIME charset) used for the body sent in this response.

2)void setCharacterEncoding(java.lang.String charset)

Sets the character encoding (MIME charset) of the response being sent to the client, for example, to UTF-8.设置响应的编码字符集为charset

3)java.lang.String getContentType()

Returns the content type used for the MIME body sent in this response.

4)void setContentType(java.lang.String type)

Sets the content type of the response being sent to the client, if the response has not been committed yet.设置响应的内容类型为type.

5)java.io.PrintWriter getWriter()

Returns a PrintWriter object that can send character text to the client返回一个PrintWriter对象,利用这个对象可以向客户端输出文本。这个对象的作用类于JSP的内置对象out。

5)ServletOutputStream getOutputStream()

Returns a ServletOutputStream suitable for writing binary data in the response

6)x boolean isCommitted()

Returns a boolean indicating if the response has been committed.

Extends the ServletResponse intece to provide HTTP-specific functionality in sending a response. For example, it has methods to access HTTP headers and cookies.

The servlet container creates an HttpServletResponse object and passes it as an argument to the servlet's service methods (doGet, doPost, etc).

1.HttpServletResponse的类结构


本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/ruanjian/article-36808-11.html

相关阅读
    发表评论  请自觉遵守互联网相关的政策法规,严禁发布、暴力、反动的言论

    • 孙伟伟
      孙伟伟

      麻麻今天去看小王子

    • 魍魉之匣
      魍魉之匣

      既然“这两个涉及到美国自身的安全

    热点图片
    拼命载入中...