aq.smali

.class public final Lcom/tendcloud/tenddata/aq;
.super Ljava/lang/Object;
.source "td"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/tendcloud/tenddata/aq$a;
    }
.end annotation


# instance fields
.field private final a:Lcom/tendcloud/tenddata/aq$a;

.field private final b:[B


# direct methods
.method public constructor <init>(Lcom/tendcloud/tenddata/aq$a;[B)V
    .registers 3

    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 2
    iput-object p1, p0, Lcom/tendcloud/tenddata/aq;->a:Lcom/tendcloud/tenddata/aq$a;

    .line 3
    iput-object p2, p0, Lcom/tendcloud/tenddata/aq;->b:[B

    return-void
.end method


# virtual methods
.method a(Ljava/net/HttpURLConnection;)V
    .registers 4

    .line 2
    iget-object v0, p0, Lcom/tendcloud/tenddata/aq;->b:[B

    array-length v0, v0

    invoke-virtual {p1, v0}, Ljava/net/HttpURLConnection;->setFixedLengthStreamingMode(I)V

    .line 3
    iget-object v0, p0, Lcom/tendcloud/tenddata/aq;->a:Lcom/tendcloud/tenddata/aq$a;

    invoke-virtual {v0}, Lcom/tendcloud/tenddata/aq$a;->getName()Ljava/lang/String;

    move-result-object v0

    const-string v1, "Content-Type"

    invoke-virtual {p1, v1, v0}, Ljava/net/HttpURLConnection;->setRequestProperty(Ljava/lang/String;Ljava/lang/String;)V

    const/4 v0, 0x0

    .line 4
    :try_start_12
    invoke-virtual {p1}, Ljava/net/HttpURLConnection;->getOutputStream()Ljava/io/OutputStream;

    move-result-object v0

    .line 5
    iget-object p1, p0, Lcom/tendcloud/tenddata/aq;->b:[B

    invoke-virtual {v0, p1}, Ljava/io/OutputStream;->write([B)V
    :try_end_1b
    .catch Ljava/lang/Throwable; {:try_start_12 .. :try_end_1b} :catch_28
    .catchall {:try_start_12 .. :try_end_1b} :catchall_21

    if-eqz v0, :cond_2b

    .line 6
    :goto_1d
    :try_start_1d
    invoke-virtual {v0}, Ljava/io/OutputStream;->close()V
    :try_end_20
    .catch Ljava/lang/Throwable; {:try_start_1d .. :try_end_20} :catch_2b

    goto :goto_2b

    :catchall_21
    move-exception p1

    if-eqz v0, :cond_27

    :try_start_24
    invoke-virtual {v0}, Ljava/io/OutputStream;->close()V
    :try_end_27
    .catch Ljava/lang/Throwable; {:try_start_24 .. :try_end_27} :catch_27

    .line 7
    :catch_27
    :cond_27
    throw p1

    :catch_28
    if-eqz v0, :cond_2b

    goto :goto_1d

    :catch_2b
    :cond_2b
    :goto_2b
    return-void
.end method

.method public a()[B
    .registers 2

    .line 1
    iget-object v0, p0, Lcom/tendcloud/tenddata/aq;->b:[B

    return-object v0
.end method

.method public b()Lcom/tendcloud/tenddata/aq$a;
    .registers 2

    .line 1
    iget-object v0, p0, Lcom/tendcloud/tenddata/aq;->a:Lcom/tendcloud/tenddata/aq$a;

    return-object v0
.end method