Class StringReader
java.lang.Object
cool.scx.http.media.string.StringReader
- All Implemented Interfaces:
MediaReader<String>
1, 如果未指定字符集则 使用 请求头中的字符集 如果请求头中的字符集为空则回退到 UTF_8
2, 如果指定字符集 忽略 请求头中的字符集
- Version:
- 0.0.1
- Author:
- scx567888
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Charsetread(InputStream inputStream, ScxHttpHeaders headers) 读取内容
-
Field Details
-
STRING_READER
常用情况 特殊情况直接 new
-
-
Constructor Details
-
StringReader
-
-
Method Details
-
getContentTypeCharsetOrUTF8
-
read
Description copied from interface:MediaReader读取内容- Specified by:
readin interfaceMediaReader<String>- Parameters:
inputStream- 输入流headers- 请求头 (在客户端状态下是 responseHeaders)- Throws:
IOException
-