alexandroid/decompiled/jadx/sources/org/apache/http/entity/AbstractHttpEntity.java
KaKi87 a47fad5135 📦 Add decompiled Alexa 2.2.730155.0 (jadx, apktool, Hermes strings)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 00:04:16 +01:00

80 lines
2.6 KiB
Java

package org.apache.http.entity;
import androidx.biometric.ErrorUtils$$ExternalSyntheticOutline0;
import com.amazon.alexa.ra.core.ui.markdown.parser.formatter.MarkdownConstants;
import java.io.IOException;
import kotlinx.serialization.json.internal.AbstractJsonLexerKt;
import org.apache.http.Header;
import org.apache.http.HttpEntity;
import org.apache.http.message.BasicHeader;
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
/* loaded from: classes11.dex */
public abstract class AbstractHttpEntity implements HttpEntity {
protected static final int OUTPUT_BUFFER_SIZE = 4096;
protected boolean chunked;
protected Header contentEncoding;
protected Header contentType;
@Override // org.apache.http.HttpEntity
public Header getContentEncoding() {
return this.contentEncoding;
}
@Override // org.apache.http.HttpEntity
public Header getContentType() {
return this.contentType;
}
@Override // org.apache.http.HttpEntity
public boolean isChunked() {
return this.chunked;
}
public void setChunked(boolean z) {
this.chunked = z;
}
public void setContentEncoding(String str) {
setContentEncoding(str != null ? new BasicHeader("Content-Encoding", str) : null);
}
public void setContentType(String str) {
setContentType(str != null ? new BasicHeader("Content-Type", str) : null);
}
public String toString() {
StringBuilder sb = new StringBuilder(MarkdownConstants.LEFT_BRACKET);
if (this.contentType != null) {
sb.append("Content-Type: ");
sb.append(this.contentType.getValue());
sb.append(AbstractJsonLexerKt.COMMA);
}
if (this.contentEncoding != null) {
sb.append("Content-Encoding: ");
sb.append(this.contentEncoding.getValue());
sb.append(AbstractJsonLexerKt.COMMA);
}
long contentLength = getContentLength();
if (contentLength >= 0) {
sb.append("Content-Length: ");
sb.append(contentLength);
sb.append(AbstractJsonLexerKt.COMMA);
}
sb.append("Chunked: ");
return ErrorUtils$$ExternalSyntheticOutline0.m(sb, this.chunked, AbstractJsonLexerKt.END_LIST);
}
public void setContentEncoding(Header header) {
this.contentEncoding = header;
}
public void setContentType(Header header) {
this.contentType = header;
}
@Override // org.apache.http.HttpEntity
@Deprecated
public void consumeContent() throws IOException {
}
}