本文整理了Java中com.github.kevinsawicki.http.HttpRequest.getValidCharset()
方法的一些代码示例,展示了HttpRequest.getValidCharset()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HttpRequest.getValidCharset()
方法的具体详情如下:
包路径:com.github.kevinsawicki.http.HttpRequest
类名称:HttpRequest
方法名:getValidCharset
暂无
代码示例来源:origin: com.restfuse/com.eclipsesource.restfuse
/**
* Get reader to response body using given character set.
* <p>
* This will fall back to using the UTF-8 character set if the given charset
* is null
*
* @param charset
* @return reader
* @throws HttpRequestException
*/
public InputStreamReader reader(final String charset)
throws HttpRequestException {
try {
return new InputStreamReader(stream(), getValidCharset(charset));
} catch (UnsupportedEncodingException e) {
throw new HttpRequestException(e);
}
}
代码示例来源:origin: com.github.kevinsawicki/http-request
/**
* Get reader to response body using given character set.
* <p>
* This will fall back to using the UTF-8 character set if the given charset
* is null
*
* @param charset
* @return reader
* @throws HttpRequestException
*/
public InputStreamReader reader(final String charset)
throws HttpRequestException {
try {
return new InputStreamReader(stream(), getValidCharset(charset));
} catch (UnsupportedEncodingException e) {
throw new HttpRequestException(e);
}
}
代码示例来源:origin: tcking/GiraffePlayer2
/**
* Get reader to response body using given character set.
* <p>
* This will fall back to using the UTF-8 character set if the given charset
* is null
*
* @param charset
* @return reader
* @throws HttpRequestException
*/
public InputStreamReader reader(final String charset)
throws HttpRequestException {
try {
return new InputStreamReader(stream(), getValidCharset(charset));
} catch (UnsupportedEncodingException e) {
throw new HttpRequestException(e);
}
}
代码示例来源:origin: lkorth/httpebble-android
/**
* Get reader to response body using given character set.
* <p/>
* This will fall back to using the UTF-8 character set if the given charset
* is null
*
* @param charset
* @return reader
* @throws HttpRequestException
*/
public InputStreamReader reader(final String charset)
throws HttpRequestException {
try {
return new InputStreamReader(stream(), getValidCharset(charset));
} catch (UnsupportedEncodingException e) {
throw new HttpRequestException(e);
}
}
代码示例来源:origin: lkorth/httpebble-android
/**
* Get response as {@link String} in given character set
* <p/>
* This will fall back to using the UTF-8 character set if the given charset
* is null
*
* @param charset
* @return string
* @throws HttpRequestException
*/
public String body(final String charset) throws HttpRequestException {
final ByteArrayOutputStream output = byteStream();
try {
copy(buffer(), output);
return output.toString(getValidCharset(charset));
} catch (IOException e) {
throw new HttpRequestException(e);
}
}
代码示例来源:origin: tcking/GiraffePlayer2
/**
* Get response as {@link String} in given character set
* <p>
* This will fall back to using the UTF-8 character set if the given charset
* is null
*
* @param charset
* @return string
* @throws HttpRequestException
*/
public String body(final String charset) throws HttpRequestException {
final ByteArrayOutputStream output = byteStream();
try {
copy(buffer(), output);
return output.toString(getValidCharset(charset));
} catch (IOException e) {
throw new HttpRequestException(e);
}
}
代码示例来源:origin: com.restfuse/com.eclipsesource.restfuse
/**
* Get response as {@link String} in given character set
* <p>
* This will fall back to using the UTF-8 character set if the given charset
* is null
*
* @param charset
* @return string
* @throws HttpRequestException
*/
public String body(final String charset) throws HttpRequestException {
final ByteArrayOutputStream output = byteStream();
try {
copy(buffer(), output);
return output.toString(getValidCharset(charset));
} catch (IOException e) {
throw new HttpRequestException(e);
}
}
代码示例来源:origin: com.github.kevinsawicki/http-request
/**
* Get response as {@link String} in given character set
* <p>
* This will fall back to using the UTF-8 character set if the given charset
* is null
*
* @param charset
* @return string
* @throws HttpRequestException
*/
public String body(final String charset) throws HttpRequestException {
final ByteArrayOutputStream output = byteStream();
try {
copy(buffer(), output);
return output.toString(getValidCharset(charset));
} catch (IOException e) {
throw new HttpRequestException(e);
}
}
代码示例来源:origin: com.github.kevinsawicki/http-request
form = true;
charset = getValidCharset(charset);
try {
openOutput();
代码示例来源:origin: tcking/GiraffePlayer2
form = true;
charset = getValidCharset(charset);
try {
openOutput();
代码示例来源:origin: com.restfuse/com.eclipsesource.restfuse
form = true;
charset = getValidCharset(charset);
try {
openOutput();
代码示例来源:origin: lkorth/httpebble-android
form = true;
charset = getValidCharset(charset);
try {
openOutput();
内容来源于网络,如有侵权,请联系作者删除!