66 lines
1.4 KiB
Java
66 lines
1.4 KiB
Java
package com.alibaba.sdk.android.oss.internal;
|
|
|
|
import com.alibaba.sdk.android.oss.common.utils.CaseInsensitiveHashMap;
|
|
import java.io.IOException;
|
|
import java.io.InputStream;
|
|
import java.util.Map;
|
|
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
/* loaded from: classes.dex */
|
|
public abstract class HttpMessage {
|
|
private Map<String, String> a = new CaseInsensitiveHashMap();
|
|
private InputStream b;
|
|
private long c;
|
|
private String d;
|
|
|
|
HttpMessage() {
|
|
}
|
|
|
|
public void a(Map<String, String> map) {
|
|
if (this.a == null) {
|
|
this.a = new CaseInsensitiveHashMap();
|
|
}
|
|
Map<String, String> map2 = this.a;
|
|
if (map2 != null && map2.size() > 0) {
|
|
this.a.clear();
|
|
}
|
|
this.a.putAll(map);
|
|
}
|
|
|
|
public InputStream b() {
|
|
return this.b;
|
|
}
|
|
|
|
public long c() {
|
|
return this.c;
|
|
}
|
|
|
|
public Map<String, String> d() {
|
|
return this.a;
|
|
}
|
|
|
|
public String e() {
|
|
return this.d;
|
|
}
|
|
|
|
public void a(String str, String str2) {
|
|
this.a.put(str, str2);
|
|
}
|
|
|
|
public void a(InputStream inputStream) {
|
|
this.b = inputStream;
|
|
}
|
|
|
|
public void a(long j) {
|
|
this.c = j;
|
|
}
|
|
|
|
public void a() throws IOException {
|
|
InputStream inputStream = this.b;
|
|
if (inputStream != null) {
|
|
inputStream.close();
|
|
this.b = null;
|
|
}
|
|
}
|
|
}
|