今奥全景相机
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.

298 lines
5.5 KiB

.class final Lcom/google/common/hash/HashCode$BytesHashCode;
.super Lcom/google/common/hash/HashCode;
.source "HashCode.java"
# interfaces
.implements Ljava/io/Serializable;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/google/common/hash/HashCode;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1a
name = "BytesHashCode"
.end annotation
# static fields
.field private static final serialVersionUID:J
# instance fields
.field final bytes:[B
# direct methods
.method constructor <init>([B)V
.locals 1
.prologue
.line 245
invoke-direct {p0}, Lcom/google/common/hash/HashCode;-><init>()V
.line 246
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
check-cast v0, [B
iput-object v0, p0, Lcom/google/common/hash/HashCode$BytesHashCode;->bytes:[B
.line 247
return-void
.end method
# virtual methods
.method public asBytes()[B
.locals 1
.prologue
.line 256
iget-object v0, p0, Lcom/google/common/hash/HashCode$BytesHashCode;->bytes:[B
invoke-virtual {v0}, [B->clone()Ljava/lang/Object;
move-result-object v0
check-cast v0, [B
return-object v0
.end method
.method public asInt()I
.locals 6
.prologue
const/4 v1, 0x1
const/4 v2, 0x0
.line 261
iget-object v0, p0, Lcom/google/common/hash/HashCode$BytesHashCode;->bytes:[B
array-length v0, v0
const/4 v3, 0x4
if-lt v0, v3, :cond_0
move v0, v1
:goto_0
const-string v3, "HashCode#asInt() requires >= 4 bytes (it only has %s bytes)."
new-array v4, v1, [Ljava/lang/Object;
iget-object v5, p0, Lcom/google/common/hash/HashCode$BytesHashCode;->bytes:[B
array-length v5, v5
invoke-static {v5}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v5
aput-object v5, v4, v2
invoke-static {v0, v3, v4}, Lcom/google/common/base/Preconditions;->checkState(ZLjava/lang/String;[Ljava/lang/Object;)V
.line 263
iget-object v0, p0, Lcom/google/common/hash/HashCode$BytesHashCode;->bytes:[B
aget-byte v0, v0, v2
and-int/lit16 v0, v0, 0xff
iget-object v2, p0, Lcom/google/common/hash/HashCode$BytesHashCode;->bytes:[B
aget-byte v1, v2, v1
and-int/lit16 v1, v1, 0xff
shl-int/lit8 v1, v1, 0x8
or-int/2addr v0, v1
iget-object v1, p0, Lcom/google/common/hash/HashCode$BytesHashCode;->bytes:[B
const/4 v2, 0x2
aget-byte v1, v1, v2
and-int/lit16 v1, v1, 0xff
shl-int/lit8 v1, v1, 0x10
or-int/2addr v0, v1
iget-object v1, p0, Lcom/google/common/hash/HashCode$BytesHashCode;->bytes:[B
const/4 v2, 0x3
aget-byte v1, v1, v2
and-int/lit16 v1, v1, 0xff
shl-int/lit8 v1, v1, 0x18
or-int/2addr v0, v1
return v0
:cond_0
move v0, v2
.line 261
goto :goto_0
.end method
.method public asLong()J
.locals 5
.prologue
const/4 v1, 0x1
const/4 v2, 0x0
.line 271
iget-object v0, p0, Lcom/google/common/hash/HashCode$BytesHashCode;->bytes:[B
array-length v0, v0
const/16 v3, 0x8
if-lt v0, v3, :cond_0
move v0, v1
:goto_0
const-string v3, "HashCode#asLong() requires >= 8 bytes (it only has %s bytes)."
new-array v1, v1, [Ljava/lang/Object;
iget-object v4, p0, Lcom/google/common/hash/HashCode$BytesHashCode;->bytes:[B
array-length v4, v4
invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v4
aput-object v4, v1, v2
invoke-static {v0, v3, v1}, Lcom/google/common/base/Preconditions;->checkState(ZLjava/lang/String;[Ljava/lang/Object;)V
.line 273
invoke-virtual {p0}, Lcom/google/common/hash/HashCode$BytesHashCode;->padToLong()J
move-result-wide v0
return-wide v0
:cond_0
move v0, v2
.line 271
goto :goto_0
.end method
.method public bits()I
.locals 1
.prologue
.line 251
iget-object v0, p0, Lcom/google/common/hash/HashCode$BytesHashCode;->bytes:[B
array-length v0, v0
mul-int/lit8 v0, v0, 0x8
return v0
.end method
.method getBytesInternal()[B
.locals 1
.prologue
.line 292
iget-object v0, p0, Lcom/google/common/hash/HashCode$BytesHashCode;->bytes:[B
return-object v0
.end method
.method public padToLong()J
.locals 8
.prologue
.line 278
iget-object v0, p0, Lcom/google/common/hash/HashCode$BytesHashCode;->bytes:[B
const/4 v1, 0x0
aget-byte v0, v0, v1
and-int/lit16 v0, v0, 0xff
int-to-long v2, v0
.line 279
const/4 v0, 0x1
:goto_0
iget-object v1, p0, Lcom/google/common/hash/HashCode$BytesHashCode;->bytes:[B
array-length v1, v1
const/16 v4, 0x8
invoke-static {v1, v4}, Ljava/lang/Math;->min(II)I
move-result v1
if-ge v0, v1, :cond_0
.line 280
iget-object v1, p0, Lcom/google/common/hash/HashCode$BytesHashCode;->bytes:[B
aget-byte v1, v1, v0
int-to-long v4, v1
const-wide/16 v6, 0xff
and-long/2addr v4, v6
mul-int/lit8 v1, v0, 0x8
shl-long/2addr v4, v1
or-long/2addr v2, v4
.line 279
add-int/lit8 v0, v0, 0x1
goto :goto_0
.line 282
:cond_0
return-wide v2
.end method
.method writeBytesToImpl([BII)V
.locals 2
.prologue
.line 287
iget-object v0, p0, Lcom/google/common/hash/HashCode$BytesHashCode;->bytes:[B
const/4 v1, 0x0
invoke-static {v0, v1, p1, p2, p3}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
.line 288
return-void
.end method