You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
111 lines
2.9 KiB
111 lines
2.9 KiB
.class public final Lcom/google/common/hash/HashingOutputStream; |
|
.super Ljava/io/FilterOutputStream; |
|
.source "HashingOutputStream.java" |
|
|
|
|
|
# annotations |
|
.annotation build Lcom/google/common/annotations/Beta; |
|
.end annotation |
|
|
|
|
|
# instance fields |
|
.field private final hasher:Lcom/google/common/hash/Hasher; |
|
|
|
|
|
# direct methods |
|
.method public constructor <init>(Lcom/google/common/hash/HashFunction;Ljava/io/OutputStream;)V |
|
.locals 1 |
|
|
|
.prologue |
|
.line 46 |
|
invoke-static {p2}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object; |
|
|
|
move-result-object v0 |
|
|
|
check-cast v0, Ljava/io/OutputStream; |
|
|
|
invoke-direct {p0, v0}, Ljava/io/FilterOutputStream;-><init>(Ljava/io/OutputStream;)V |
|
|
|
.line 47 |
|
invoke-interface {p1}, Lcom/google/common/hash/HashFunction;->newHasher()Lcom/google/common/hash/Hasher; |
|
|
|
move-result-object v0 |
|
|
|
invoke-static {v0}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object; |
|
|
|
move-result-object v0 |
|
|
|
check-cast v0, Lcom/google/common/hash/Hasher; |
|
|
|
iput-object v0, p0, Lcom/google/common/hash/HashingOutputStream;->hasher:Lcom/google/common/hash/Hasher; |
|
|
|
.line 48 |
|
return-void |
|
.end method |
|
|
|
|
|
# virtual methods |
|
.method public close()V |
|
.locals 1 |
|
|
|
.prologue |
|
.line 72 |
|
iget-object v0, p0, Lcom/google/common/hash/HashingOutputStream;->out:Ljava/io/OutputStream; |
|
|
|
invoke-virtual {v0}, Ljava/io/OutputStream;->close()V |
|
|
|
.line 73 |
|
return-void |
|
.end method |
|
|
|
.method public hash()Lcom/google/common/hash/HashCode; |
|
.locals 1 |
|
|
|
.prologue |
|
.line 65 |
|
iget-object v0, p0, Lcom/google/common/hash/HashingOutputStream;->hasher:Lcom/google/common/hash/Hasher; |
|
|
|
invoke-interface {v0}, Lcom/google/common/hash/Hasher;->hash()Lcom/google/common/hash/HashCode; |
|
|
|
move-result-object v0 |
|
|
|
return-object v0 |
|
.end method |
|
|
|
.method public write(I)V |
|
.locals 2 |
|
|
|
.prologue |
|
.line 51 |
|
iget-object v0, p0, Lcom/google/common/hash/HashingOutputStream;->hasher:Lcom/google/common/hash/Hasher; |
|
|
|
int-to-byte v1, p1 |
|
|
|
invoke-interface {v0, v1}, Lcom/google/common/hash/Hasher;->putByte(B)Lcom/google/common/hash/Hasher; |
|
|
|
.line 52 |
|
iget-object v0, p0, Lcom/google/common/hash/HashingOutputStream;->out:Ljava/io/OutputStream; |
|
|
|
invoke-virtual {v0, p1}, Ljava/io/OutputStream;->write(I)V |
|
|
|
.line 53 |
|
return-void |
|
.end method |
|
|
|
.method public write([BII)V |
|
.locals 1 |
|
|
|
.prologue |
|
.line 56 |
|
iget-object v0, p0, Lcom/google/common/hash/HashingOutputStream;->hasher:Lcom/google/common/hash/Hasher; |
|
|
|
invoke-interface {v0, p1, p2, p3}, Lcom/google/common/hash/Hasher;->putBytes([BII)Lcom/google/common/hash/Hasher; |
|
|
|
.line 57 |
|
iget-object v0, p0, Lcom/google/common/hash/HashingOutputStream;->out:Ljava/io/OutputStream; |
|
|
|
invoke-virtual {v0, p1, p2, p3}, Ljava/io/OutputStream;->write([BII)V |
|
|
|
.line 58 |
|
return-void |
|
.end method
|
|
|