- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
64 lines
1.5 KiB
Java
64 lines
1.5 KiB
Java
package com.amazonaws.http;
|
|
|
|
import com.amazonaws.util.StringUtils;
|
|
import java.io.InputStream;
|
|
import java.net.URI;
|
|
import java.util.Collections;
|
|
import java.util.Map;
|
|
import org.apache.http.protocol.HTTP;
|
|
|
|
/* loaded from: classes.dex */
|
|
public class HttpRequest {
|
|
public final InputStream content;
|
|
public final Map headers;
|
|
public boolean isStreaming;
|
|
public final String method;
|
|
public URI uri;
|
|
|
|
public InputStream getContent() {
|
|
return this.content;
|
|
}
|
|
|
|
public Map getHeaders() {
|
|
return this.headers;
|
|
}
|
|
|
|
public String getMethod() {
|
|
return this.method;
|
|
}
|
|
|
|
public URI getUri() {
|
|
return this.uri;
|
|
}
|
|
|
|
public boolean isStreaming() {
|
|
return this.isStreaming;
|
|
}
|
|
|
|
public void setStreaming(boolean z) {
|
|
this.isStreaming = z;
|
|
}
|
|
|
|
public HttpRequest(String str, URI uri, Map map, InputStream inputStream) {
|
|
Map unmodifiableMap;
|
|
this.method = StringUtils.upperCase(str);
|
|
this.uri = uri;
|
|
if (map == null) {
|
|
unmodifiableMap = Collections.EMPTY_MAP;
|
|
} else {
|
|
unmodifiableMap = Collections.unmodifiableMap(map);
|
|
}
|
|
this.headers = unmodifiableMap;
|
|
this.content = inputStream;
|
|
}
|
|
|
|
public long getContentLength() {
|
|
String str;
|
|
Map map = this.headers;
|
|
if (map == null || (str = (String) map.get(HTTP.CONTENT_LEN)) == null || str.isEmpty()) {
|
|
return 0L;
|
|
}
|
|
return Long.valueOf(str).longValue();
|
|
}
|
|
}
|