140 lines
3.0 KiB
Smali
140 lines
3.0 KiB
Smali
.class public Lcz/msebera/android/httpclient/impl/auth/g;
|
|
.super Ljava/io/OutputStream;
|
|
.source "HttpEntityDigester.java"
|
|
|
|
|
|
# instance fields
|
|
.field public final a:Ljava/security/MessageDigest;
|
|
|
|
.field public b:Z
|
|
|
|
.field public c:[B
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Ljava/security/MessageDigest;)V
|
|
.locals 0
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Ljava/io/OutputStream;-><init>()V
|
|
|
|
.line 2
|
|
iput-object p1, p0, Lcz/msebera/android/httpclient/impl/auth/g;->a:Ljava/security/MessageDigest;
|
|
|
|
.line 3
|
|
invoke-virtual {p1}, Ljava/security/MessageDigest;->reset()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public a()[B
|
|
.locals 1
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lcz/msebera/android/httpclient/impl/auth/g;->c:[B
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public close()V
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
iget-boolean v0, p0, Lcz/msebera/android/httpclient/impl/auth/g;->b:Z
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const/4 v0, 0x1
|
|
|
|
.line 2
|
|
iput-boolean v0, p0, Lcz/msebera/android/httpclient/impl/auth/g;->b:Z
|
|
|
|
.line 3
|
|
iget-object v0, p0, Lcz/msebera/android/httpclient/impl/auth/g;->a:Ljava/security/MessageDigest;
|
|
|
|
invoke-virtual {v0}, Ljava/security/MessageDigest;->digest()[B
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcz/msebera/android/httpclient/impl/auth/g;->c:[B
|
|
|
|
.line 4
|
|
invoke-super {p0}, Ljava/io/OutputStream;->close()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public write(I)V
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
iget-boolean v0, p0, Lcz/msebera/android/httpclient/impl/auth/g;->b:Z
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
.line 2
|
|
iget-object v0, p0, Lcz/msebera/android/httpclient/impl/auth/g;->a:Ljava/security/MessageDigest;
|
|
|
|
int-to-byte p1, p1
|
|
|
|
invoke-virtual {v0, p1}, Ljava/security/MessageDigest;->update(B)V
|
|
|
|
return-void
|
|
|
|
.line 3
|
|
:cond_0
|
|
new-instance p1, Ljava/io/IOException;
|
|
|
|
const-string v0, "Stream has been already closed"
|
|
|
|
invoke-direct {p1, v0}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public write([BII)V
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 4
|
|
iget-boolean v0, p0, Lcz/msebera/android/httpclient/impl/auth/g;->b:Z
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
.line 5
|
|
iget-object v0, p0, Lcz/msebera/android/httpclient/impl/auth/g;->a:Ljava/security/MessageDigest;
|
|
|
|
invoke-virtual {v0, p1, p2, p3}, Ljava/security/MessageDigest;->update([BII)V
|
|
|
|
return-void
|
|
|
|
.line 6
|
|
:cond_0
|
|
new-instance p1, Ljava/io/IOException;
|
|
|
|
const-string p2, "Stream has been already closed"
|
|
|
|
invoke-direct {p1, p2}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
.end method
|