package com.mstar.android.samba;

import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
import java.util.Properties;

/* JADX INFO: loaded from: classes.dex */
public class Response {
    public static final String HTTP_BADREQUEST = "400 Bad Request";
    public static final String HTTP_FORBIDDEN = "403 Forbidden";
    public static final String HTTP_INTERNALERROR = "500 Internal Server Error";
    public static final String HTTP_NOTFOUND = "404 Not Found";
    public static final String HTTP_NOTIMPLEMENTED = "501 Not Implemented";
    public static final String HTTP_NOTMODIFIED = "304 Not Modified";
    public static final String HTTP_OK = "200 OK";
    public static final String HTTP_PARTIALCONTENT = "206 Partial Content";
    public static final String HTTP_RANGE_NOT_SATISFIABLE = "416 Requested Range Not Satisfiable";
    public static final String HTTP_REDIRECT = "301 Moved Permanently";
    public InputStream data;
    public Properties header;
    public String mimeType;
    public String status;

    public Response() {
        this.header = new Properties();
        this.status = "200 OK";
    }

    public void addHeader(String str, String str2) {
        this.header.put(str, str2);
    }

    public Response(String str, String str2, InputStream inputStream) {
        this.header = new Properties();
        this.status = str;
        this.mimeType = str2;
        this.data = inputStream;
    }

    public Response(String str, String str2, String str3) {
        this.header = new Properties();
        this.status = str;
        this.mimeType = str2;
        try {
            this.data = new ByteArrayInputStream(str3.getBytes("UTF-8"));
        } catch (UnsupportedEncodingException e2) {
            e2.printStackTrace();
        }
    }
}
