本文整理了Java中com.amazonaws.http.HttpResponse.getRawContent()
方法的一些代码示例,展示了HttpResponse.getRawContent()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HttpResponse.getRawContent()
方法的具体详情如下:
包路径:com.amazonaws.http.HttpResponse
类名称:HttpResponse
方法名:getRawContent
[英]Get the raw content without considering Content-Encoding. This is useful if you want full control of the content.
[中]获取原始内容而不考虑内容编码。如果您想要完全控制内容,这非常有用。
代码示例来源:origin: aws-amplify/aws-sdk-android
/**
* Get the raw content without considering Content-Encoding. This is useful
* if you want full control of the content.
*
* @return the raw content input stream.
* @throws IOException if an I/O error has occurred
*/
public InputStream getRawContent() throws IOException {
return response.getRawContent();
}
代码示例来源:origin: aws-amplify/aws-sdk-android
InputStream content = response.getRawContent();
if (content == null) {
代码示例来源:origin: com.amazonaws/aws-android-sdk-apigateway-core
/**
* Get the raw content without considering Content-Encoding. This is useful
* if you want full control of the content.
*
* @return the raw content input stream.
* @throws IOException if an I/O error has occurred
*/
public InputStream getRawContent() throws IOException {
return response.getRawContent();
}
代码示例来源:origin: aws-amplify/aws-sdk-android
if (httpResponse.getRawContent() != null) {
httpResponse.getRawContent().close();
代码示例来源:origin: aws-amplify/aws-sdk-android
@Test
public void testContentEncodingGZIPRaw() throws Exception {
String str = "content to be zipped";
InputStream zippedContent = getGzippedInputStream(str);
builder = HttpResponse.builder()
.header("Content-Encoding", "gzip")
.content(zippedContent);
response = builder.build();
InputStream rawContent = response.getRawContent();
assertFalse("Not gzip", rawContent instanceof GZIPInputStream);
GZIPInputStream gis = new GZIPInputStream(rawContent);
String result = IOUtils.toString(gis);
assertEquals("unzip correctly", str, result);
}
代码示例来源:origin: com.gluonhq/aws-java-sdk-core
InputStream content = response.getRawContent();
if (content == null) {
代码示例来源:origin: com.amazonaws/aws-android-sdk-core
InputStream content = response.getRawContent();
if (content == null) {
代码示例来源:origin: com.gluonhq/aws-java-sdk-core
if (httpResponse.getRawContent() != null) {
httpResponse.getRawContent().close();
代码示例来源:origin: com.amazonaws/aws-android-sdk-core
if (httpResponse.getRawContent() != null) {
httpResponse.getRawContent().close();
内容来源于网络,如有侵权,请联系作者删除!