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.
368 lines
11 KiB
368 lines
11 KiB
.class final Lcom/google/common/io/BaseEncoding$SeparatedBaseEncoding; |
|
.super Lcom/google/common/io/BaseEncoding; |
|
.source "BaseEncoding.java" |
|
|
|
|
|
# annotations |
|
.annotation system Ldalvik/annotation/EnclosingClass; |
|
value = Lcom/google/common/io/BaseEncoding; |
|
.end annotation |
|
|
|
.annotation system Ldalvik/annotation/InnerClass; |
|
accessFlags = 0x18 |
|
name = "SeparatedBaseEncoding" |
|
.end annotation |
|
|
|
|
|
# instance fields |
|
.field private final afterEveryChars:I |
|
|
|
.field private final delegate:Lcom/google/common/io/BaseEncoding; |
|
|
|
.field private final separator:Ljava/lang/String; |
|
|
|
.field private final separatorChars:Lcom/google/common/base/CharMatcher; |
|
|
|
|
|
# direct methods |
|
.method constructor <init>(Lcom/google/common/io/BaseEncoding;Ljava/lang/String;I)V |
|
.locals 5 |
|
|
|
.prologue |
|
const/4 v1, 0x1 |
|
|
|
const/4 v2, 0x0 |
|
|
|
.line 814 |
|
invoke-direct {p0}, Lcom/google/common/io/BaseEncoding;-><init>()V |
|
|
|
.line 815 |
|
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object; |
|
|
|
move-result-object v0 |
|
|
|
check-cast v0, Lcom/google/common/io/BaseEncoding; |
|
|
|
iput-object v0, p0, Lcom/google/common/io/BaseEncoding$SeparatedBaseEncoding;->delegate:Lcom/google/common/io/BaseEncoding; |
|
|
|
.line 816 |
|
invoke-static {p2}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object; |
|
|
|
move-result-object v0 |
|
|
|
check-cast v0, Ljava/lang/String; |
|
|
|
iput-object v0, p0, Lcom/google/common/io/BaseEncoding$SeparatedBaseEncoding;->separator:Ljava/lang/String; |
|
|
|
.line 817 |
|
iput p3, p0, Lcom/google/common/io/BaseEncoding$SeparatedBaseEncoding;->afterEveryChars:I |
|
|
|
.line 818 |
|
if-lez p3, :cond_0 |
|
|
|
move v0, v1 |
|
|
|
:goto_0 |
|
const-string v3, "Cannot add a separator after every %s chars" |
|
|
|
new-array v1, v1, [Ljava/lang/Object; |
|
|
|
invoke-static {p3}, 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;->checkArgument(ZLjava/lang/String;[Ljava/lang/Object;)V |
|
|
|
.line 820 |
|
invoke-static {p2}, Lcom/google/common/base/CharMatcher;->anyOf(Ljava/lang/CharSequence;)Lcom/google/common/base/CharMatcher; |
|
|
|
move-result-object v0 |
|
|
|
invoke-virtual {v0}, Lcom/google/common/base/CharMatcher;->precomputed()Lcom/google/common/base/CharMatcher; |
|
|
|
move-result-object v0 |
|
|
|
iput-object v0, p0, Lcom/google/common/io/BaseEncoding$SeparatedBaseEncoding;->separatorChars:Lcom/google/common/base/CharMatcher; |
|
|
|
.line 821 |
|
return-void |
|
|
|
:cond_0 |
|
move v0, v2 |
|
|
|
.line 818 |
|
goto :goto_0 |
|
.end method |
|
|
|
|
|
# virtual methods |
|
.method decodingStream(Lcom/google/common/io/GwtWorkarounds$CharInput;)Lcom/google/common/io/GwtWorkarounds$ByteInput; |
|
.locals 2 |
|
|
|
.prologue |
|
.line 847 |
|
iget-object v0, p0, Lcom/google/common/io/BaseEncoding$SeparatedBaseEncoding;->delegate:Lcom/google/common/io/BaseEncoding; |
|
|
|
iget-object v1, p0, Lcom/google/common/io/BaseEncoding$SeparatedBaseEncoding;->separatorChars:Lcom/google/common/base/CharMatcher; |
|
|
|
invoke-static {p1, v1}, Lcom/google/common/io/BaseEncoding$SeparatedBaseEncoding;->ignoringInput(Lcom/google/common/io/GwtWorkarounds$CharInput;Lcom/google/common/base/CharMatcher;)Lcom/google/common/io/GwtWorkarounds$CharInput; |
|
|
|
move-result-object v1 |
|
|
|
invoke-virtual {v0, v1}, Lcom/google/common/io/BaseEncoding;->decodingStream(Lcom/google/common/io/GwtWorkarounds$CharInput;)Lcom/google/common/io/GwtWorkarounds$ByteInput; |
|
|
|
move-result-object v0 |
|
|
|
return-object v0 |
|
.end method |
|
|
|
.method encodingStream(Lcom/google/common/io/GwtWorkarounds$CharOutput;)Lcom/google/common/io/GwtWorkarounds$ByteOutput; |
|
.locals 3 |
|
|
|
.prologue |
|
.line 837 |
|
iget-object v0, p0, Lcom/google/common/io/BaseEncoding$SeparatedBaseEncoding;->delegate:Lcom/google/common/io/BaseEncoding; |
|
|
|
iget-object v1, p0, Lcom/google/common/io/BaseEncoding$SeparatedBaseEncoding;->separator:Ljava/lang/String; |
|
|
|
iget v2, p0, Lcom/google/common/io/BaseEncoding$SeparatedBaseEncoding;->afterEveryChars:I |
|
|
|
invoke-static {p1, v1, v2}, Lcom/google/common/io/BaseEncoding$SeparatedBaseEncoding;->separatingOutput(Lcom/google/common/io/GwtWorkarounds$CharOutput;Ljava/lang/String;I)Lcom/google/common/io/GwtWorkarounds$CharOutput; |
|
|
|
move-result-object v1 |
|
|
|
invoke-virtual {v0, v1}, Lcom/google/common/io/BaseEncoding;->encodingStream(Lcom/google/common/io/GwtWorkarounds$CharOutput;)Lcom/google/common/io/GwtWorkarounds$ByteOutput; |
|
|
|
move-result-object v0 |
|
|
|
return-object v0 |
|
.end method |
|
|
|
.method public lowerCase()Lcom/google/common/io/BaseEncoding; |
|
.locals 3 |
|
|
|
.prologue |
|
.line 872 |
|
iget-object v0, p0, Lcom/google/common/io/BaseEncoding$SeparatedBaseEncoding;->delegate:Lcom/google/common/io/BaseEncoding; |
|
|
|
invoke-virtual {v0}, Lcom/google/common/io/BaseEncoding;->lowerCase()Lcom/google/common/io/BaseEncoding; |
|
|
|
move-result-object v0 |
|
|
|
iget-object v1, p0, Lcom/google/common/io/BaseEncoding$SeparatedBaseEncoding;->separator:Ljava/lang/String; |
|
|
|
iget v2, p0, Lcom/google/common/io/BaseEncoding$SeparatedBaseEncoding;->afterEveryChars:I |
|
|
|
invoke-virtual {v0, v1, v2}, Lcom/google/common/io/BaseEncoding;->withSeparator(Ljava/lang/String;I)Lcom/google/common/io/BaseEncoding; |
|
|
|
move-result-object v0 |
|
|
|
return-object v0 |
|
.end method |
|
|
|
.method maxDecodedSize(I)I |
|
.locals 1 |
|
|
|
.prologue |
|
.line 842 |
|
iget-object v0, p0, Lcom/google/common/io/BaseEncoding$SeparatedBaseEncoding;->delegate:Lcom/google/common/io/BaseEncoding; |
|
|
|
invoke-virtual {v0, p1}, Lcom/google/common/io/BaseEncoding;->maxDecodedSize(I)I |
|
|
|
move-result v0 |
|
|
|
return v0 |
|
.end method |
|
|
|
.method maxEncodedSize(I)I |
|
.locals 5 |
|
|
|
.prologue |
|
.line 830 |
|
iget-object v0, p0, Lcom/google/common/io/BaseEncoding$SeparatedBaseEncoding;->delegate:Lcom/google/common/io/BaseEncoding; |
|
|
|
invoke-virtual {v0, p1}, Lcom/google/common/io/BaseEncoding;->maxEncodedSize(I)I |
|
|
|
move-result v0 |
|
|
|
.line 831 |
|
iget-object v1, p0, Lcom/google/common/io/BaseEncoding$SeparatedBaseEncoding;->separator:Ljava/lang/String; |
|
|
|
invoke-virtual {v1}, Ljava/lang/String;->length()I |
|
|
|
move-result v1 |
|
|
|
const/4 v2, 0x0 |
|
|
|
add-int/lit8 v3, v0, -0x1 |
|
|
|
invoke-static {v2, v3}, Ljava/lang/Math;->max(II)I |
|
|
|
move-result v2 |
|
|
|
iget v3, p0, Lcom/google/common/io/BaseEncoding$SeparatedBaseEncoding;->afterEveryChars:I |
|
|
|
sget-object v4, Ljava/math/RoundingMode;->FLOOR:Ljava/math/RoundingMode; |
|
|
|
invoke-static {v2, v3, v4}, Lcom/google/common/math/IntMath;->divide(IILjava/math/RoundingMode;)I |
|
|
|
move-result v2 |
|
|
|
mul-int/2addr v1, v2 |
|
|
|
add-int/2addr v0, v1 |
|
|
|
return v0 |
|
.end method |
|
|
|
.method public omitPadding()Lcom/google/common/io/BaseEncoding; |
|
.locals 3 |
|
|
|
.prologue |
|
.line 852 |
|
iget-object v0, p0, Lcom/google/common/io/BaseEncoding$SeparatedBaseEncoding;->delegate:Lcom/google/common/io/BaseEncoding; |
|
|
|
invoke-virtual {v0}, Lcom/google/common/io/BaseEncoding;->omitPadding()Lcom/google/common/io/BaseEncoding; |
|
|
|
move-result-object v0 |
|
|
|
iget-object v1, p0, Lcom/google/common/io/BaseEncoding$SeparatedBaseEncoding;->separator:Ljava/lang/String; |
|
|
|
iget v2, p0, Lcom/google/common/io/BaseEncoding$SeparatedBaseEncoding;->afterEveryChars:I |
|
|
|
invoke-virtual {v0, v1, v2}, Lcom/google/common/io/BaseEncoding;->withSeparator(Ljava/lang/String;I)Lcom/google/common/io/BaseEncoding; |
|
|
|
move-result-object v0 |
|
|
|
return-object v0 |
|
.end method |
|
|
|
.method padding()Lcom/google/common/base/CharMatcher; |
|
.locals 1 |
|
|
|
.prologue |
|
.line 825 |
|
iget-object v0, p0, Lcom/google/common/io/BaseEncoding$SeparatedBaseEncoding;->delegate:Lcom/google/common/io/BaseEncoding; |
|
|
|
invoke-virtual {v0}, Lcom/google/common/io/BaseEncoding;->padding()Lcom/google/common/base/CharMatcher; |
|
|
|
move-result-object v0 |
|
|
|
return-object v0 |
|
.end method |
|
|
|
.method public toString()Ljava/lang/String; |
|
.locals 2 |
|
|
|
.prologue |
|
.line 877 |
|
new-instance v0, Ljava/lang/StringBuilder; |
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V |
|
|
|
iget-object v1, p0, Lcom/google/common/io/BaseEncoding$SeparatedBaseEncoding;->delegate:Lcom/google/common/io/BaseEncoding; |
|
|
|
invoke-virtual {v1}, Ljava/lang/Object;->toString()Ljava/lang/String; |
|
|
|
move-result-object v1 |
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v0 |
|
|
|
const-string v1, ".withSeparator(\"" |
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v0 |
|
|
|
iget-object v1, p0, Lcom/google/common/io/BaseEncoding$SeparatedBaseEncoding;->separator:Ljava/lang/String; |
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v0 |
|
|
|
const-string v1, "\", " |
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v0 |
|
|
|
iget v1, p0, Lcom/google/common/io/BaseEncoding$SeparatedBaseEncoding;->afterEveryChars:I |
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v0 |
|
|
|
const-string v1, ")" |
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v0 |
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; |
|
|
|
move-result-object v0 |
|
|
|
return-object v0 |
|
.end method |
|
|
|
.method public upperCase()Lcom/google/common/io/BaseEncoding; |
|
.locals 3 |
|
|
|
.prologue |
|
.line 867 |
|
iget-object v0, p0, Lcom/google/common/io/BaseEncoding$SeparatedBaseEncoding;->delegate:Lcom/google/common/io/BaseEncoding; |
|
|
|
invoke-virtual {v0}, Lcom/google/common/io/BaseEncoding;->upperCase()Lcom/google/common/io/BaseEncoding; |
|
|
|
move-result-object v0 |
|
|
|
iget-object v1, p0, Lcom/google/common/io/BaseEncoding$SeparatedBaseEncoding;->separator:Ljava/lang/String; |
|
|
|
iget v2, p0, Lcom/google/common/io/BaseEncoding$SeparatedBaseEncoding;->afterEveryChars:I |
|
|
|
invoke-virtual {v0, v1, v2}, Lcom/google/common/io/BaseEncoding;->withSeparator(Ljava/lang/String;I)Lcom/google/common/io/BaseEncoding; |
|
|
|
move-result-object v0 |
|
|
|
return-object v0 |
|
.end method |
|
|
|
.method public withPadChar(C)Lcom/google/common/io/BaseEncoding; |
|
.locals 3 |
|
|
|
.prologue |
|
.line 857 |
|
iget-object v0, p0, Lcom/google/common/io/BaseEncoding$SeparatedBaseEncoding;->delegate:Lcom/google/common/io/BaseEncoding; |
|
|
|
invoke-virtual {v0, p1}, Lcom/google/common/io/BaseEncoding;->withPadChar(C)Lcom/google/common/io/BaseEncoding; |
|
|
|
move-result-object v0 |
|
|
|
iget-object v1, p0, Lcom/google/common/io/BaseEncoding$SeparatedBaseEncoding;->separator:Ljava/lang/String; |
|
|
|
iget v2, p0, Lcom/google/common/io/BaseEncoding$SeparatedBaseEncoding;->afterEveryChars:I |
|
|
|
invoke-virtual {v0, v1, v2}, Lcom/google/common/io/BaseEncoding;->withSeparator(Ljava/lang/String;I)Lcom/google/common/io/BaseEncoding; |
|
|
|
move-result-object v0 |
|
|
|
return-object v0 |
|
.end method |
|
|
|
.method public withSeparator(Ljava/lang/String;I)Lcom/google/common/io/BaseEncoding; |
|
.locals 2 |
|
|
|
.prologue |
|
.line 862 |
|
new-instance v0, Ljava/lang/UnsupportedOperationException; |
|
|
|
const-string v1, "Already have a separator" |
|
|
|
invoke-direct {v0, v1}, Ljava/lang/UnsupportedOperationException;-><init>(Ljava/lang/String;)V |
|
|
|
throw v0 |
|
.end method
|
|
|