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.
350 lines
11 KiB
350 lines
11 KiB
.class Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$2; |
|
.super Ljava/lang/Object; |
|
.source "BaseEncoding.java" |
|
|
|
# interfaces |
|
.implements Lcom/google/common/io/GwtWorkarounds$ByteInput; |
|
|
|
|
|
# annotations |
|
.annotation system Ldalvik/annotation/EnclosingMethod; |
|
value = Lcom/google/common/io/BaseEncoding$StandardBaseEncoding;->decodingStream(Lcom/google/common/io/GwtWorkarounds$CharInput;)Lcom/google/common/io/GwtWorkarounds$ByteInput; |
|
.end annotation |
|
|
|
.annotation system Ldalvik/annotation/InnerClass; |
|
accessFlags = 0x0 |
|
name = null |
|
.end annotation |
|
|
|
|
|
# instance fields |
|
.field bitBuffer:I |
|
|
|
.field bitBufferLength:I |
|
|
|
.field hitPadding:Z |
|
|
|
.field final paddingMatcher:Lcom/google/common/base/CharMatcher; |
|
|
|
.field readChars:I |
|
|
|
.field final synthetic this$0:Lcom/google/common/io/BaseEncoding$StandardBaseEncoding; |
|
|
|
.field final synthetic val$reader:Lcom/google/common/io/GwtWorkarounds$CharInput; |
|
|
|
|
|
# direct methods |
|
.method constructor <init>(Lcom/google/common/io/BaseEncoding$StandardBaseEncoding;Lcom/google/common/io/GwtWorkarounds$CharInput;)V |
|
.locals 1 |
|
|
|
.prologue |
|
const/4 v0, 0x0 |
|
|
|
.line 645 |
|
iput-object p1, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$2;->this$0:Lcom/google/common/io/BaseEncoding$StandardBaseEncoding; |
|
|
|
iput-object p2, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$2;->val$reader:Lcom/google/common/io/GwtWorkarounds$CharInput; |
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V |
|
|
|
.line 646 |
|
iput v0, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$2;->bitBuffer:I |
|
|
|
.line 647 |
|
iput v0, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$2;->bitBufferLength:I |
|
|
|
.line 648 |
|
iput v0, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$2;->readChars:I |
|
|
|
.line 649 |
|
iput-boolean v0, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$2;->hitPadding:Z |
|
|
|
.line 650 |
|
iget-object v0, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$2;->this$0:Lcom/google/common/io/BaseEncoding$StandardBaseEncoding; |
|
|
|
invoke-virtual {v0}, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding;->padding()Lcom/google/common/base/CharMatcher; |
|
|
|
move-result-object v0 |
|
|
|
iput-object v0, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$2;->paddingMatcher:Lcom/google/common/base/CharMatcher; |
|
|
|
return-void |
|
.end method |
|
|
|
|
|
# virtual methods |
|
.method public close()V |
|
.locals 1 |
|
|
|
.prologue |
|
.line 688 |
|
iget-object v0, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$2;->val$reader:Lcom/google/common/io/GwtWorkarounds$CharInput; |
|
|
|
invoke-interface {v0}, Lcom/google/common/io/GwtWorkarounds$CharInput;->close()V |
|
|
|
.line 689 |
|
return-void |
|
.end method |
|
|
|
.method public read()I |
|
.locals 5 |
|
|
|
.prologue |
|
const/4 v4, 0x1 |
|
|
|
const/4 v0, -0x1 |
|
|
|
.line 655 |
|
:cond_0 |
|
:goto_0 |
|
iget-object v1, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$2;->val$reader:Lcom/google/common/io/GwtWorkarounds$CharInput; |
|
|
|
invoke-interface {v1}, Lcom/google/common/io/GwtWorkarounds$CharInput;->read()I |
|
|
|
move-result v1 |
|
|
|
.line 656 |
|
if-ne v1, v0, :cond_1 |
|
|
|
.line 657 |
|
iget-boolean v1, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$2;->hitPadding:Z |
|
|
|
if-nez v1, :cond_6 |
|
|
|
iget-object v1, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$2;->this$0:Lcom/google/common/io/BaseEncoding$StandardBaseEncoding; |
|
|
|
invoke-static {v1}, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding;->access$000(Lcom/google/common/io/BaseEncoding$StandardBaseEncoding;)Lcom/google/common/io/BaseEncoding$Alphabet; |
|
|
|
move-result-object v1 |
|
|
|
iget v2, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$2;->readChars:I |
|
|
|
invoke-virtual {v1, v2}, Lcom/google/common/io/BaseEncoding$Alphabet;->isValidPaddingStartPosition(I)Z |
|
|
|
move-result v1 |
|
|
|
if-nez v1, :cond_6 |
|
|
|
.line 658 |
|
new-instance v0, Lcom/google/common/io/BaseEncoding$DecodingException; |
|
|
|
new-instance v1, Ljava/lang/StringBuilder; |
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V |
|
|
|
const-string v2, "Invalid input length " |
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v1 |
|
|
|
iget v2, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$2;->readChars:I |
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v1 |
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; |
|
|
|
move-result-object v1 |
|
|
|
invoke-direct {v0, v1}, Lcom/google/common/io/BaseEncoding$DecodingException;-><init>(Ljava/lang/String;)V |
|
|
|
throw v0 |
|
|
|
.line 662 |
|
:cond_1 |
|
iget v2, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$2;->readChars:I |
|
|
|
add-int/lit8 v2, v2, 0x1 |
|
|
|
iput v2, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$2;->readChars:I |
|
|
|
.line 663 |
|
int-to-char v1, v1 |
|
|
|
.line 664 |
|
iget-object v2, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$2;->paddingMatcher:Lcom/google/common/base/CharMatcher; |
|
|
|
invoke-virtual {v2, v1}, Lcom/google/common/base/CharMatcher;->matches(C)Z |
|
|
|
move-result v2 |
|
|
|
if-eqz v2, :cond_4 |
|
|
|
.line 665 |
|
iget-boolean v1, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$2;->hitPadding:Z |
|
|
|
if-nez v1, :cond_3 |
|
|
|
iget v1, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$2;->readChars:I |
|
|
|
if-eq v1, v4, :cond_2 |
|
|
|
iget-object v1, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$2;->this$0:Lcom/google/common/io/BaseEncoding$StandardBaseEncoding; |
|
|
|
invoke-static {v1}, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding;->access$000(Lcom/google/common/io/BaseEncoding$StandardBaseEncoding;)Lcom/google/common/io/BaseEncoding$Alphabet; |
|
|
|
move-result-object v1 |
|
|
|
iget v2, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$2;->readChars:I |
|
|
|
add-int/lit8 v2, v2, -0x1 |
|
|
|
invoke-virtual {v1, v2}, Lcom/google/common/io/BaseEncoding$Alphabet;->isValidPaddingStartPosition(I)Z |
|
|
|
move-result v1 |
|
|
|
if-nez v1, :cond_3 |
|
|
|
.line 667 |
|
:cond_2 |
|
new-instance v0, Lcom/google/common/io/BaseEncoding$DecodingException; |
|
|
|
new-instance v1, Ljava/lang/StringBuilder; |
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V |
|
|
|
const-string v2, "Padding cannot start at index " |
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v1 |
|
|
|
iget v2, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$2;->readChars:I |
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v1 |
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; |
|
|
|
move-result-object v1 |
|
|
|
invoke-direct {v0, v1}, Lcom/google/common/io/BaseEncoding$DecodingException;-><init>(Ljava/lang/String;)V |
|
|
|
throw v0 |
|
|
|
.line 669 |
|
:cond_3 |
|
iput-boolean v4, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$2;->hitPadding:Z |
|
|
|
goto :goto_0 |
|
|
|
.line 670 |
|
:cond_4 |
|
iget-boolean v2, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$2;->hitPadding:Z |
|
|
|
if-eqz v2, :cond_5 |
|
|
|
.line 671 |
|
new-instance v0, Lcom/google/common/io/BaseEncoding$DecodingException; |
|
|
|
new-instance v2, Ljava/lang/StringBuilder; |
|
|
|
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V |
|
|
|
const-string v3, "Expected padding character but found \'" |
|
|
|
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v2 |
|
|
|
invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v1 |
|
|
|
const-string v2, "\' at index " |
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v1 |
|
|
|
iget v2, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$2;->readChars:I |
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v1 |
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; |
|
|
|
move-result-object v1 |
|
|
|
invoke-direct {v0, v1}, Lcom/google/common/io/BaseEncoding$DecodingException;-><init>(Ljava/lang/String;)V |
|
|
|
throw v0 |
|
|
|
.line 674 |
|
:cond_5 |
|
iget v2, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$2;->bitBuffer:I |
|
|
|
iget-object v3, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$2;->this$0:Lcom/google/common/io/BaseEncoding$StandardBaseEncoding; |
|
|
|
invoke-static {v3}, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding;->access$000(Lcom/google/common/io/BaseEncoding$StandardBaseEncoding;)Lcom/google/common/io/BaseEncoding$Alphabet; |
|
|
|
move-result-object v3 |
|
|
|
iget v3, v3, Lcom/google/common/io/BaseEncoding$Alphabet;->bitsPerChar:I |
|
|
|
shl-int/2addr v2, v3 |
|
|
|
iput v2, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$2;->bitBuffer:I |
|
|
|
.line 675 |
|
iget v2, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$2;->bitBuffer:I |
|
|
|
iget-object v3, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$2;->this$0:Lcom/google/common/io/BaseEncoding$StandardBaseEncoding; |
|
|
|
invoke-static {v3}, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding;->access$000(Lcom/google/common/io/BaseEncoding$StandardBaseEncoding;)Lcom/google/common/io/BaseEncoding$Alphabet; |
|
|
|
move-result-object v3 |
|
|
|
invoke-virtual {v3, v1}, Lcom/google/common/io/BaseEncoding$Alphabet;->decode(C)I |
|
|
|
move-result v1 |
|
|
|
or-int/2addr v1, v2 |
|
|
|
iput v1, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$2;->bitBuffer:I |
|
|
|
.line 676 |
|
iget v1, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$2;->bitBufferLength:I |
|
|
|
iget-object v2, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$2;->this$0:Lcom/google/common/io/BaseEncoding$StandardBaseEncoding; |
|
|
|
invoke-static {v2}, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding;->access$000(Lcom/google/common/io/BaseEncoding$StandardBaseEncoding;)Lcom/google/common/io/BaseEncoding$Alphabet; |
|
|
|
move-result-object v2 |
|
|
|
iget v2, v2, Lcom/google/common/io/BaseEncoding$Alphabet;->bitsPerChar:I |
|
|
|
add-int/2addr v1, v2 |
|
|
|
iput v1, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$2;->bitBufferLength:I |
|
|
|
.line 678 |
|
iget v1, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$2;->bitBufferLength:I |
|
|
|
const/16 v2, 0x8 |
|
|
|
if-lt v1, v2, :cond_0 |
|
|
|
.line 679 |
|
iget v0, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$2;->bitBufferLength:I |
|
|
|
add-int/lit8 v0, v0, -0x8 |
|
|
|
iput v0, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$2;->bitBufferLength:I |
|
|
|
.line 680 |
|
iget v0, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$2;->bitBuffer:I |
|
|
|
iget v1, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$2;->bitBufferLength:I |
|
|
|
shr-int/2addr v0, v1 |
|
|
|
and-int/lit16 v0, v0, 0xff |
|
|
|
:cond_6 |
|
return v0 |
|
.end method
|
|
|