This commit is contained in:
2022-06-10 21:38:30 +09:00
commit 27f5152838
51323 changed files with 12934539 additions and 0 deletions
@@ -0,0 +1,332 @@
.class Lcom/google/common/io/AppendableWriter;
.super Ljava/io/Writer;
.source "AppendableWriter.java"
# annotations
.annotation build Lcom/google/common/annotations/GwtIncompatible;
.end annotation
.annotation runtime Lcom/google/common/io/ElementTypesAreNonnullByDefault;
.end annotation
# instance fields
.field private closed:Z
.field private final target:Ljava/lang/Appendable;
# direct methods
.method public constructor <init>(Ljava/lang/Appendable;)V
.locals 0
.line 1
invoke-direct {p0}, Ljava/io/Writer;-><init>()V
.line 2
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p1
check-cast p1, Ljava/lang/Appendable;
iput-object p1, p0, Lcom/google/common/io/AppendableWriter;->target:Ljava/lang/Appendable;
return-void
.end method
.method private checkNotClosed()V
.locals 2
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
iget-boolean v0, p0, Lcom/google/common/io/AppendableWriter;->closed:Z
if-nez v0, :cond_0
return-void
.line 2
:cond_0
new-instance v0, Ljava/io/IOException;
const-string v1, "Cannot write to a closed writer."
invoke-direct {v0, v1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
throw v0
.end method
# virtual methods
.method public append(C)Ljava/io/Writer;
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 4
invoke-direct {p0}, Lcom/google/common/io/AppendableWriter;->checkNotClosed()V
.line 5
iget-object v0, p0, Lcom/google/common/io/AppendableWriter;->target:Ljava/lang/Appendable;
invoke-interface {v0, p1}, Ljava/lang/Appendable;->append(C)Ljava/lang/Appendable;
return-object p0
.end method
.method public append(Ljava/lang/CharSequence;)Ljava/io/Writer;
.locals 1
.param p1 # Ljava/lang/CharSequence;
.annotation runtime Ljavax/annotation/CheckForNull;
.end annotation
.end param
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 6
invoke-direct {p0}, Lcom/google/common/io/AppendableWriter;->checkNotClosed()V
.line 7
iget-object v0, p0, Lcom/google/common/io/AppendableWriter;->target:Ljava/lang/Appendable;
invoke-interface {v0, p1}, Ljava/lang/Appendable;->append(Ljava/lang/CharSequence;)Ljava/lang/Appendable;
return-object p0
.end method
.method public append(Ljava/lang/CharSequence;II)Ljava/io/Writer;
.locals 1
.param p1 # Ljava/lang/CharSequence;
.annotation runtime Ljavax/annotation/CheckForNull;
.end annotation
.end param
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 8
invoke-direct {p0}, Lcom/google/common/io/AppendableWriter;->checkNotClosed()V
.line 9
iget-object v0, p0, Lcom/google/common/io/AppendableWriter;->target:Ljava/lang/Appendable;
invoke-interface {v0, p1, p2, p3}, Ljava/lang/Appendable;->append(Ljava/lang/CharSequence;II)Ljava/lang/Appendable;
return-object p0
.end method
.method public bridge synthetic append(C)Ljava/lang/Appendable;
.locals 0
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
invoke-virtual {p0, p1}, Lcom/google/common/io/AppendableWriter;->append(C)Ljava/io/Writer;
move-result-object p1
return-object p1
.end method
.method public bridge synthetic append(Ljava/lang/CharSequence;)Ljava/lang/Appendable;
.locals 0
.param p1 # Ljava/lang/CharSequence;
.annotation runtime Ljavax/annotation/CheckForNull;
.end annotation
.end param
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 2
invoke-virtual {p0, p1}, Lcom/google/common/io/AppendableWriter;->append(Ljava/lang/CharSequence;)Ljava/io/Writer;
move-result-object p1
return-object p1
.end method
.method public bridge synthetic append(Ljava/lang/CharSequence;II)Ljava/lang/Appendable;
.locals 0
.param p1 # Ljava/lang/CharSequence;
.annotation runtime Ljavax/annotation/CheckForNull;
.end annotation
.end param
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 3
invoke-virtual {p0, p1, p2, p3}, Lcom/google/common/io/AppendableWriter;->append(Ljava/lang/CharSequence;II)Ljava/io/Writer;
move-result-object p1
return-object p1
.end method
.method public close()V
.locals 2
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
const/4 v0, 0x1
.line 1
iput-boolean v0, p0, Lcom/google/common/io/AppendableWriter;->closed:Z
.line 2
iget-object v0, p0, Lcom/google/common/io/AppendableWriter;->target:Ljava/lang/Appendable;
instance-of v1, v0, Ljava/io/Closeable;
if-eqz v1, :cond_0
.line 3
check-cast v0, Ljava/io/Closeable;
invoke-interface {v0}, Ljava/io/Closeable;->close()V
:cond_0
return-void
.end method
.method public flush()V
.locals 2
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
invoke-direct {p0}, Lcom/google/common/io/AppendableWriter;->checkNotClosed()V
.line 2
iget-object v0, p0, Lcom/google/common/io/AppendableWriter;->target:Ljava/lang/Appendable;
instance-of v1, v0, Ljava/io/Flushable;
if-eqz v1, :cond_0
.line 3
check-cast v0, Ljava/io/Flushable;
invoke-interface {v0}, Ljava/io/Flushable;->flush()V
:cond_0
return-void
.end method
.method public write(I)V
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 3
invoke-direct {p0}, Lcom/google/common/io/AppendableWriter;->checkNotClosed()V
.line 4
iget-object v0, p0, Lcom/google/common/io/AppendableWriter;->target:Ljava/lang/Appendable;
int-to-char p1, p1
invoke-interface {v0, p1}, Ljava/lang/Appendable;->append(C)Ljava/lang/Appendable;
return-void
.end method
.method public write(Ljava/lang/String;)V
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 5
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
.line 6
invoke-direct {p0}, Lcom/google/common/io/AppendableWriter;->checkNotClosed()V
.line 7
iget-object v0, p0, Lcom/google/common/io/AppendableWriter;->target:Ljava/lang/Appendable;
invoke-interface {v0, p1}, Ljava/lang/Appendable;->append(Ljava/lang/CharSequence;)Ljava/lang/Appendable;
return-void
.end method
.method public write(Ljava/lang/String;II)V
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 8
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
.line 9
invoke-direct {p0}, Lcom/google/common/io/AppendableWriter;->checkNotClosed()V
.line 10
iget-object v0, p0, Lcom/google/common/io/AppendableWriter;->target:Ljava/lang/Appendable;
add-int/2addr p3, p2
invoke-interface {v0, p1, p2, p3}, Ljava/lang/Appendable;->append(Ljava/lang/CharSequence;II)Ljava/lang/Appendable;
return-void
.end method
.method public write([CII)V
.locals 2
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
invoke-direct {p0}, Lcom/google/common/io/AppendableWriter;->checkNotClosed()V
.line 2
iget-object v0, p0, Lcom/google/common/io/AppendableWriter;->target:Ljava/lang/Appendable;
new-instance v1, Ljava/lang/String;
invoke-direct {v1, p1, p2, p3}, Ljava/lang/String;-><init>([CII)V
invoke-interface {v0, v1}, Ljava/lang/Appendable;->append(Ljava/lang/CharSequence;)Ljava/lang/Appendable;
return-void
.end method
@@ -0,0 +1,61 @@
.class Lcom/google/common/io/BaseEncoding$1;
.super Lcom/google/common/io/ByteSink;
.source "BaseEncoding.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
value = Lcom/google/common/io/BaseEncoding;->encodingSink(Lcom/google/common/io/CharSink;)Lcom/google/common/io/ByteSink;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1
name = null
.end annotation
# instance fields
.field public final synthetic this$0:Lcom/google/common/io/BaseEncoding;
.field public final synthetic val$encodedSink:Lcom/google/common/io/CharSink;
# direct methods
.method public constructor <init>(Lcom/google/common/io/BaseEncoding;Lcom/google/common/io/CharSink;)V
.locals 0
.line 1
iput-object p1, p0, Lcom/google/common/io/BaseEncoding$1;->this$0:Lcom/google/common/io/BaseEncoding;
iput-object p2, p0, Lcom/google/common/io/BaseEncoding$1;->val$encodedSink:Lcom/google/common/io/CharSink;
invoke-direct {p0}, Lcom/google/common/io/ByteSink;-><init>()V
return-void
.end method
# virtual methods
.method public openStream()Ljava/io/OutputStream;
.locals 2
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
iget-object v0, p0, Lcom/google/common/io/BaseEncoding$1;->this$0:Lcom/google/common/io/BaseEncoding;
iget-object v1, p0, Lcom/google/common/io/BaseEncoding$1;->val$encodedSink:Lcom/google/common/io/CharSink;
invoke-virtual {v1}, Lcom/google/common/io/CharSink;->openStream()Ljava/io/Writer;
move-result-object v1
invoke-virtual {v0, v1}, Lcom/google/common/io/BaseEncoding;->encodingStream(Ljava/io/Writer;)Ljava/io/OutputStream;
move-result-object v0
return-object v0
.end method
@@ -0,0 +1,61 @@
.class Lcom/google/common/io/BaseEncoding$2;
.super Lcom/google/common/io/ByteSource;
.source "BaseEncoding.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
value = Lcom/google/common/io/BaseEncoding;->decodingSource(Lcom/google/common/io/CharSource;)Lcom/google/common/io/ByteSource;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1
name = null
.end annotation
# instance fields
.field public final synthetic this$0:Lcom/google/common/io/BaseEncoding;
.field public final synthetic val$encodedSource:Lcom/google/common/io/CharSource;
# direct methods
.method public constructor <init>(Lcom/google/common/io/BaseEncoding;Lcom/google/common/io/CharSource;)V
.locals 0
.line 1
iput-object p1, p0, Lcom/google/common/io/BaseEncoding$2;->this$0:Lcom/google/common/io/BaseEncoding;
iput-object p2, p0, Lcom/google/common/io/BaseEncoding$2;->val$encodedSource:Lcom/google/common/io/CharSource;
invoke-direct {p0}, Lcom/google/common/io/ByteSource;-><init>()V
return-void
.end method
# virtual methods
.method public openStream()Ljava/io/InputStream;
.locals 2
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
iget-object v0, p0, Lcom/google/common/io/BaseEncoding$2;->this$0:Lcom/google/common/io/BaseEncoding;
iget-object v1, p0, Lcom/google/common/io/BaseEncoding$2;->val$encodedSource:Lcom/google/common/io/CharSource;
invoke-virtual {v1}, Lcom/google/common/io/CharSource;->openStream()Ljava/io/Reader;
move-result-object v1
invoke-virtual {v0, v1}, Lcom/google/common/io/BaseEncoding;->decodingStream(Ljava/io/Reader;)Ljava/io/InputStream;
move-result-object v0
return-object v0
.end method
@@ -0,0 +1,104 @@
.class Lcom/google/common/io/BaseEncoding$3;
.super Ljava/io/Reader;
.source "BaseEncoding.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
value = Lcom/google/common/io/BaseEncoding;->ignoringReader(Ljava/io/Reader;Ljava/lang/String;)Ljava/io/Reader;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1
name = null
.end annotation
# instance fields
.field public final synthetic val$delegate:Ljava/io/Reader;
.field public final synthetic val$toIgnore:Ljava/lang/String;
# direct methods
.method public constructor <init>(Ljava/io/Reader;Ljava/lang/String;)V
.locals 0
.line 1
iput-object p1, p0, Lcom/google/common/io/BaseEncoding$3;->val$delegate:Ljava/io/Reader;
iput-object p2, p0, Lcom/google/common/io/BaseEncoding$3;->val$toIgnore:Ljava/lang/String;
invoke-direct {p0}, Ljava/io/Reader;-><init>()V
return-void
.end method
# virtual methods
.method public close()V
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
iget-object v0, p0, Lcom/google/common/io/BaseEncoding$3;->val$delegate:Ljava/io/Reader;
invoke-virtual {v0}, Ljava/io/Reader;->close()V
return-void
.end method
.method public read()I
.locals 3
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
:cond_0
iget-object v0, p0, Lcom/google/common/io/BaseEncoding$3;->val$delegate:Ljava/io/Reader;
invoke-virtual {v0}, Ljava/io/Reader;->read()I
move-result v0
const/4 v1, -0x1
if-eq v0, v1, :cond_1
.line 2
iget-object v1, p0, Lcom/google/common/io/BaseEncoding$3;->val$toIgnore:Ljava/lang/String;
int-to-char v2, v0
invoke-virtual {v1, v2}, Ljava/lang/String;->indexOf(I)I
move-result v1
if-gez v1, :cond_0
:cond_1
return v0
.end method
.method public read([CII)I
.locals 0
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 3
new-instance p1, Ljava/lang/UnsupportedOperationException;
invoke-direct {p1}, Ljava/lang/UnsupportedOperationException;-><init>()V
throw p1
.end method
@@ -0,0 +1,120 @@
.class Lcom/google/common/io/BaseEncoding$4;
.super Ljava/lang/Object;
.source "BaseEncoding.java"
# interfaces
.implements Ljava/lang/Appendable;
# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
value = Lcom/google/common/io/BaseEncoding;->separatingAppendable(Ljava/lang/Appendable;Ljava/lang/String;I)Ljava/lang/Appendable;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1
name = null
.end annotation
# instance fields
.field public charsUntilSeparator:I
.field public final synthetic val$afterEveryChars:I
.field public final synthetic val$delegate:Ljava/lang/Appendable;
.field public final synthetic val$separator:Ljava/lang/String;
# direct methods
.method public constructor <init>(ILjava/lang/Appendable;Ljava/lang/String;)V
.locals 0
.line 1
iput p1, p0, Lcom/google/common/io/BaseEncoding$4;->val$afterEveryChars:I
iput-object p2, p0, Lcom/google/common/io/BaseEncoding$4;->val$delegate:Ljava/lang/Appendable;
iput-object p3, p0, Lcom/google/common/io/BaseEncoding$4;->val$separator:Ljava/lang/String;
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 2
iput p1, p0, Lcom/google/common/io/BaseEncoding$4;->charsUntilSeparator:I
return-void
.end method
# virtual methods
.method public append(C)Ljava/lang/Appendable;
.locals 2
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
iget v0, p0, Lcom/google/common/io/BaseEncoding$4;->charsUntilSeparator:I
if-nez v0, :cond_0
.line 2
iget-object v0, p0, Lcom/google/common/io/BaseEncoding$4;->val$delegate:Ljava/lang/Appendable;
iget-object v1, p0, Lcom/google/common/io/BaseEncoding$4;->val$separator:Ljava/lang/String;
invoke-interface {v0, v1}, Ljava/lang/Appendable;->append(Ljava/lang/CharSequence;)Ljava/lang/Appendable;
.line 3
iget v0, p0, Lcom/google/common/io/BaseEncoding$4;->val$afterEveryChars:I
iput v0, p0, Lcom/google/common/io/BaseEncoding$4;->charsUntilSeparator:I
.line 4
:cond_0
iget-object v0, p0, Lcom/google/common/io/BaseEncoding$4;->val$delegate:Ljava/lang/Appendable;
invoke-interface {v0, p1}, Ljava/lang/Appendable;->append(C)Ljava/lang/Appendable;
.line 5
iget p1, p0, Lcom/google/common/io/BaseEncoding$4;->charsUntilSeparator:I
add-int/lit8 p1, p1, -0x1
iput p1, p0, Lcom/google/common/io/BaseEncoding$4;->charsUntilSeparator:I
return-object p0
.end method
.method public append(Ljava/lang/CharSequence;)Ljava/lang/Appendable;
.locals 0
.param p1 # Ljava/lang/CharSequence;
.annotation runtime Ljavax/annotation/CheckForNull;
.end annotation
.end param
.line 7
new-instance p1, Ljava/lang/UnsupportedOperationException;
invoke-direct {p1}, Ljava/lang/UnsupportedOperationException;-><init>()V
throw p1
.end method
.method public append(Ljava/lang/CharSequence;II)Ljava/lang/Appendable;
.locals 0
.param p1 # Ljava/lang/CharSequence;
.annotation runtime Ljavax/annotation/CheckForNull;
.end annotation
.end param
.line 6
new-instance p1, Ljava/lang/UnsupportedOperationException;
invoke-direct {p1}, Ljava/lang/UnsupportedOperationException;-><init>()V
throw p1
.end method
@@ -0,0 +1,103 @@
.class Lcom/google/common/io/BaseEncoding$5;
.super Ljava/io/Writer;
.source "BaseEncoding.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
value = Lcom/google/common/io/BaseEncoding;->separatingWriter(Ljava/io/Writer;Ljava/lang/String;I)Ljava/io/Writer;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1
name = null
.end annotation
# instance fields
.field public final synthetic val$delegate:Ljava/io/Writer;
.field public final synthetic val$separatingAppendable:Ljava/lang/Appendable;
# direct methods
.method public constructor <init>(Ljava/lang/Appendable;Ljava/io/Writer;)V
.locals 0
.line 1
iput-object p1, p0, Lcom/google/common/io/BaseEncoding$5;->val$separatingAppendable:Ljava/lang/Appendable;
iput-object p2, p0, Lcom/google/common/io/BaseEncoding$5;->val$delegate:Ljava/io/Writer;
invoke-direct {p0}, Ljava/io/Writer;-><init>()V
return-void
.end method
# virtual methods
.method public close()V
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
iget-object v0, p0, Lcom/google/common/io/BaseEncoding$5;->val$delegate:Ljava/io/Writer;
invoke-virtual {v0}, Ljava/io/Writer;->close()V
return-void
.end method
.method public flush()V
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
iget-object v0, p0, Lcom/google/common/io/BaseEncoding$5;->val$delegate:Ljava/io/Writer;
invoke-virtual {v0}, Ljava/io/Writer;->flush()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-object v0, p0, Lcom/google/common/io/BaseEncoding$5;->val$separatingAppendable:Ljava/lang/Appendable;
int-to-char p1, p1
invoke-interface {v0, p1}, Ljava/lang/Appendable;->append(C)Ljava/lang/Appendable;
return-void
.end method
.method public write([CII)V
.locals 0
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 2
new-instance p1, Ljava/lang/UnsupportedOperationException;
invoke-direct {p1}, Ljava/lang/UnsupportedOperationException;-><init>()V
throw p1
.end method
@@ -0,0 +1,758 @@
.class final Lcom/google/common/io/BaseEncoding$Alphabet;
.super Ljava/lang/Object;
.source "BaseEncoding.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/google/common/io/BaseEncoding;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = "Alphabet"
.end annotation
# instance fields
.field public final bitsPerChar:I
.field public final bytesPerChunk:I
.field private final chars:[C
.field public final charsPerChunk:I
.field private final decodabet:[B
.field public final mask:I
.field private final name:Ljava/lang/String;
.field private final validPadding:[Z
# direct methods
.method public constructor <init>(Ljava/lang/String;[C)V
.locals 8
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 2
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p1
check-cast p1, Ljava/lang/String;
iput-object p1, p0, Lcom/google/common/io/BaseEncoding$Alphabet;->name:Ljava/lang/String;
.line 3
invoke-static {p2}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p1
check-cast p1, [C
iput-object p1, p0, Lcom/google/common/io/BaseEncoding$Alphabet;->chars:[C
.line 4
:try_start_0
array-length p1, p2
sget-object v0, Ljava/math/RoundingMode;->UNNECESSARY:Ljava/math/RoundingMode;
invoke-static {p1, v0}, Lcom/google/common/math/IntMath;->log2(ILjava/math/RoundingMode;)I
move-result p1
iput p1, p0, Lcom/google/common/io/BaseEncoding$Alphabet;->bitsPerChar:I
:try_end_0
.catch Ljava/lang/ArithmeticException; {:try_start_0 .. :try_end_0} :catch_1
.line 5
invoke-static {p1}, Ljava/lang/Integer;->lowestOneBit(I)I
move-result v0
const/16 v1, 0x8
invoke-static {v1, v0}, Ljava/lang/Math;->min(II)I
move-result v0
.line 6
:try_start_1
div-int/2addr v1, v0
iput v1, p0, Lcom/google/common/io/BaseEncoding$Alphabet;->charsPerChunk:I
.line 7
div-int/2addr p1, v0
iput p1, p0, Lcom/google/common/io/BaseEncoding$Alphabet;->bytesPerChunk:I
:try_end_1
.catch Ljava/lang/ArithmeticException; {:try_start_1 .. :try_end_1} :catch_0
.line 8
array-length p1, p2
const/4 v0, 0x1
sub-int/2addr p1, v0
iput p1, p0, Lcom/google/common/io/BaseEncoding$Alphabet;->mask:I
const/16 p1, 0x80
new-array v1, p1, [B
const/4 v2, -0x1
.line 9
invoke-static {v1, v2}, Ljava/util/Arrays;->fill([BB)V
const/4 v3, 0x0
move v4, v3
.line 10
:goto_0
array-length v5, p2
if-ge v4, v5, :cond_2
.line 11
aget-char v5, p2, v4
if-ge v5, p1, :cond_0
move v6, v0
goto :goto_1
:cond_0
move v6, v3
:goto_1
const-string v7, "Non-ASCII character: %s"
.line 12
invoke-static {v6, v7, v5}, Lcom/google/common/base/Preconditions;->checkArgument(ZLjava/lang/String;C)V
.line 13
aget-byte v6, v1, v5
if-ne v6, v2, :cond_1
move v6, v0
goto :goto_2
:cond_1
move v6, v3
:goto_2
const-string v7, "Duplicate character: %s"
invoke-static {v6, v7, v5}, Lcom/google/common/base/Preconditions;->checkArgument(ZLjava/lang/String;C)V
int-to-byte v6, v4
.line 14
aput-byte v6, v1, v5
add-int/lit8 v4, v4, 0x1
goto :goto_0
.line 15
:cond_2
iput-object v1, p0, Lcom/google/common/io/BaseEncoding$Alphabet;->decodabet:[B
.line 16
iget p1, p0, Lcom/google/common/io/BaseEncoding$Alphabet;->charsPerChunk:I
new-array p1, p1, [Z
.line 17
:goto_3
iget p2, p0, Lcom/google/common/io/BaseEncoding$Alphabet;->bytesPerChunk:I
if-ge v3, p2, :cond_3
mul-int/lit8 p2, v3, 0x8
.line 18
iget v1, p0, Lcom/google/common/io/BaseEncoding$Alphabet;->bitsPerChar:I
sget-object v2, Ljava/math/RoundingMode;->CEILING:Ljava/math/RoundingMode;
invoke-static {p2, v1, v2}, Lcom/google/common/math/IntMath;->divide(IILjava/math/RoundingMode;)I
move-result p2
aput-boolean v0, p1, p2
add-int/lit8 v3, v3, 0x1
goto :goto_3
.line 19
:cond_3
iput-object p1, p0, Lcom/google/common/io/BaseEncoding$Alphabet;->validPadding:[Z
return-void
:catch_0
move-exception p1
.line 20
new-instance v0, Ljava/lang/IllegalArgumentException;
const-string v1, "Illegal alphabet "
new-instance v2, Ljava/lang/String;
invoke-direct {v2, p2}, Ljava/lang/String;-><init>([C)V
invoke-virtual {v2}, Ljava/lang/String;->length()I
move-result p2
if-eqz p2, :cond_4
invoke-virtual {v1, v2}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
move-result-object p2
goto :goto_4
:cond_4
new-instance p2, Ljava/lang/String;
invoke-direct {p2, v1}, Ljava/lang/String;-><init>(Ljava/lang/String;)V
:goto_4
invoke-direct {v0, p2, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
throw v0
:catch_1
move-exception p1
.line 21
new-instance v0, Ljava/lang/IllegalArgumentException;
array-length p2, p2
const/16 v1, 0x23
const-string v2, "Illegal alphabet length "
invoke-static {v1, v2, p2}, Lcom/google/android/gms/ads/a;->a(ILjava/lang/String;I)Ljava/lang/String;
move-result-object p2
invoke-direct {v0, p2, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
throw v0
.end method
.method public static synthetic access$000(Lcom/google/common/io/BaseEncoding$Alphabet;)[C
.locals 0
.line 1
iget-object p0, p0, Lcom/google/common/io/BaseEncoding$Alphabet;->chars:[C
return-object p0
.end method
.method private hasLowerCase()Z
.locals 5
.line 1
iget-object v0, p0, Lcom/google/common/io/BaseEncoding$Alphabet;->chars:[C
array-length v1, v0
const/4 v2, 0x0
move v3, v2
:goto_0
if-ge v3, v1, :cond_1
aget-char v4, v0, v3
.line 2
invoke-static {v4}, Lcom/google/common/base/Ascii;->isLowerCase(C)Z
move-result v4
if-eqz v4, :cond_0
const/4 v0, 0x1
return v0
:cond_0
add-int/lit8 v3, v3, 0x1
goto :goto_0
:cond_1
return v2
.end method
.method private hasUpperCase()Z
.locals 5
.line 1
iget-object v0, p0, Lcom/google/common/io/BaseEncoding$Alphabet;->chars:[C
array-length v1, v0
const/4 v2, 0x0
move v3, v2
:goto_0
if-ge v3, v1, :cond_1
aget-char v4, v0, v3
.line 2
invoke-static {v4}, Lcom/google/common/base/Ascii;->isUpperCase(C)Z
move-result v4
if-eqz v4, :cond_0
const/4 v0, 0x1
return v0
:cond_0
add-int/lit8 v3, v3, 0x1
goto :goto_0
:cond_1
return v2
.end method
# virtual methods
.method public canDecode(C)Z
.locals 1
const/16 v0, 0x7f
if-gt p1, v0, :cond_0
.line 1
iget-object v0, p0, Lcom/google/common/io/BaseEncoding$Alphabet;->decodabet:[B
aget-byte p1, v0, p1
const/4 v0, -0x1
if-eq p1, v0, :cond_0
const/4 p1, 0x1
goto :goto_0
:cond_0
const/4 p1, 0x0
:goto_0
return p1
.end method
.method public decode(C)I
.locals 4
.annotation system Ldalvik/annotation/Throws;
value = {
Lcom/google/common/io/BaseEncoding$DecodingException;
}
.end annotation
const-string v0, "Unrecognized character: 0x"
const/16 v1, 0x7f
if-le p1, v1, :cond_1
.line 1
new-instance v1, Lcom/google/common/io/BaseEncoding$DecodingException;
invoke-static {p1}, Ljava/lang/Integer;->toHexString(I)Ljava/lang/String;
move-result-object p1
invoke-static {p1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
move-result-object p1
invoke-virtual {p1}, Ljava/lang/String;->length()I
move-result v2
if-eqz v2, :cond_0
invoke-virtual {v0, p1}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
move-result-object p1
goto :goto_0
:cond_0
new-instance p1, Ljava/lang/String;
invoke-direct {p1, v0}, Ljava/lang/String;-><init>(Ljava/lang/String;)V
:goto_0
invoke-direct {v1, p1}, Lcom/google/common/io/BaseEncoding$DecodingException;-><init>(Ljava/lang/String;)V
throw v1
.line 2
:cond_1
iget-object v2, p0, Lcom/google/common/io/BaseEncoding$Alphabet;->decodabet:[B
aget-byte v2, v2, p1
const/4 v3, -0x1
if-ne v2, v3, :cond_5
const/16 v2, 0x20
if-le p1, v2, :cond_3
if-ne p1, v1, :cond_2
goto :goto_1
.line 3
:cond_2
new-instance v0, Lcom/google/common/io/BaseEncoding$DecodingException;
const/16 v1, 0x19
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2, v1}, Ljava/lang/StringBuilder;-><init>(I)V
const-string v1, "Unrecognized character: "
invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {v0, p1}, Lcom/google/common/io/BaseEncoding$DecodingException;-><init>(Ljava/lang/String;)V
throw v0
.line 4
:cond_3
:goto_1
new-instance v1, Lcom/google/common/io/BaseEncoding$DecodingException;
invoke-static {p1}, Ljava/lang/Integer;->toHexString(I)Ljava/lang/String;
move-result-object p1
invoke-static {p1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
move-result-object p1
invoke-virtual {p1}, Ljava/lang/String;->length()I
move-result v2
if-eqz v2, :cond_4
invoke-virtual {v0, p1}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
move-result-object p1
goto :goto_2
:cond_4
new-instance p1, Ljava/lang/String;
invoke-direct {p1, v0}, Ljava/lang/String;-><init>(Ljava/lang/String;)V
:goto_2
invoke-direct {v1, p1}, Lcom/google/common/io/BaseEncoding$DecodingException;-><init>(Ljava/lang/String;)V
throw v1
:cond_5
return v2
.end method
.method public encode(I)C
.locals 1
.line 1
iget-object v0, p0, Lcom/google/common/io/BaseEncoding$Alphabet;->chars:[C
aget-char p1, v0, p1
return p1
.end method
.method public equals(Ljava/lang/Object;)Z
.locals 1
.param p1 # Ljava/lang/Object;
.annotation runtime Ljavax/annotation/CheckForNull;
.end annotation
.end param
.line 1
instance-of v0, p1, Lcom/google/common/io/BaseEncoding$Alphabet;
if-eqz v0, :cond_0
.line 2
check-cast p1, Lcom/google/common/io/BaseEncoding$Alphabet;
.line 3
iget-object v0, p0, Lcom/google/common/io/BaseEncoding$Alphabet;->chars:[C
iget-object p1, p1, Lcom/google/common/io/BaseEncoding$Alphabet;->chars:[C
invoke-static {v0, p1}, Ljava/util/Arrays;->equals([C[C)Z
move-result p1
return p1
:cond_0
const/4 p1, 0x0
return p1
.end method
.method public hashCode()I
.locals 1
.line 1
iget-object v0, p0, Lcom/google/common/io/BaseEncoding$Alphabet;->chars:[C
invoke-static {v0}, Ljava/util/Arrays;->hashCode([C)I
move-result v0
return v0
.end method
.method public isValidPaddingStartPosition(I)Z
.locals 2
.line 1
iget-object v0, p0, Lcom/google/common/io/BaseEncoding$Alphabet;->validPadding:[Z
iget v1, p0, Lcom/google/common/io/BaseEncoding$Alphabet;->charsPerChunk:I
rem-int/2addr p1, v1
aget-boolean p1, v0, p1
return p1
.end method
.method public lowerCase()Lcom/google/common/io/BaseEncoding$Alphabet;
.locals 4
.line 1
invoke-direct {p0}, Lcom/google/common/io/BaseEncoding$Alphabet;->hasUpperCase()Z
move-result v0
if-nez v0, :cond_0
return-object p0
.line 2
:cond_0
invoke-direct {p0}, Lcom/google/common/io/BaseEncoding$Alphabet;->hasLowerCase()Z
move-result v0
xor-int/lit8 v0, v0, 0x1
const-string v1, "Cannot call lowerCase() on a mixed-case alphabet"
invoke-static {v0, v1}, Lcom/google/common/base/Preconditions;->checkState(ZLjava/lang/Object;)V
.line 3
iget-object v0, p0, Lcom/google/common/io/BaseEncoding$Alphabet;->chars:[C
array-length v0, v0
new-array v0, v0, [C
const/4 v1, 0x0
.line 4
:goto_0
iget-object v2, p0, Lcom/google/common/io/BaseEncoding$Alphabet;->chars:[C
array-length v3, v2
if-ge v1, v3, :cond_1
.line 5
aget-char v2, v2, v1
invoke-static {v2}, Lcom/google/common/base/Ascii;->toLowerCase(C)C
move-result v2
aput-char v2, v0, v1
add-int/lit8 v1, v1, 0x1
goto :goto_0
.line 6
:cond_1
new-instance v1, Lcom/google/common/io/BaseEncoding$Alphabet;
iget-object v2, p0, Lcom/google/common/io/BaseEncoding$Alphabet;->name:Ljava/lang/String;
invoke-static {v2}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
move-result-object v2
const-string v3, ".lowerCase()"
invoke-virtual {v2, v3}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
move-result-object v2
invoke-direct {v1, v2, v0}, Lcom/google/common/io/BaseEncoding$Alphabet;-><init>(Ljava/lang/String;[C)V
return-object v1
.end method
.method public matches(C)Z
.locals 2
.line 1
iget-object v0, p0, Lcom/google/common/io/BaseEncoding$Alphabet;->decodabet:[B
array-length v1, v0
if-ge p1, v1, :cond_0
aget-byte p1, v0, p1
const/4 v0, -0x1
if-eq p1, v0, :cond_0
const/4 p1, 0x1
goto :goto_0
:cond_0
const/4 p1, 0x0
:goto_0
return p1
.end method
.method public toString()Ljava/lang/String;
.locals 1
.line 1
iget-object v0, p0, Lcom/google/common/io/BaseEncoding$Alphabet;->name:Ljava/lang/String;
return-object v0
.end method
.method public upperCase()Lcom/google/common/io/BaseEncoding$Alphabet;
.locals 4
.line 1
invoke-direct {p0}, Lcom/google/common/io/BaseEncoding$Alphabet;->hasLowerCase()Z
move-result v0
if-nez v0, :cond_0
return-object p0
.line 2
:cond_0
invoke-direct {p0}, Lcom/google/common/io/BaseEncoding$Alphabet;->hasUpperCase()Z
move-result v0
xor-int/lit8 v0, v0, 0x1
const-string v1, "Cannot call upperCase() on a mixed-case alphabet"
invoke-static {v0, v1}, Lcom/google/common/base/Preconditions;->checkState(ZLjava/lang/Object;)V
.line 3
iget-object v0, p0, Lcom/google/common/io/BaseEncoding$Alphabet;->chars:[C
array-length v0, v0
new-array v0, v0, [C
const/4 v1, 0x0
.line 4
:goto_0
iget-object v2, p0, Lcom/google/common/io/BaseEncoding$Alphabet;->chars:[C
array-length v3, v2
if-ge v1, v3, :cond_1
.line 5
aget-char v2, v2, v1
invoke-static {v2}, Lcom/google/common/base/Ascii;->toUpperCase(C)C
move-result v2
aput-char v2, v0, v1
add-int/lit8 v1, v1, 0x1
goto :goto_0
.line 6
:cond_1
new-instance v1, Lcom/google/common/io/BaseEncoding$Alphabet;
iget-object v2, p0, Lcom/google/common/io/BaseEncoding$Alphabet;->name:Ljava/lang/String;
invoke-static {v2}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
move-result-object v2
const-string v3, ".upperCase()"
invoke-virtual {v2, v3}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
move-result-object v2
invoke-direct {v1, v2, v0}, Lcom/google/common/io/BaseEncoding$Alphabet;-><init>(Ljava/lang/String;[C)V
return-object v1
.end method
@@ -0,0 +1,281 @@
.class final Lcom/google/common/io/BaseEncoding$Base16Encoding;
.super Lcom/google/common/io/BaseEncoding$StandardBaseEncoding;
.source "BaseEncoding.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/google/common/io/BaseEncoding;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = "Base16Encoding"
.end annotation
# instance fields
.field public final encoding:[C
# direct methods
.method private constructor <init>(Lcom/google/common/io/BaseEncoding$Alphabet;)V
.locals 4
const/4 v0, 0x0
.line 2
invoke-direct {p0, p1, v0}, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding;-><init>(Lcom/google/common/io/BaseEncoding$Alphabet;Ljava/lang/Character;)V
const/16 v0, 0x200
new-array v0, v0, [C
.line 3
iput-object v0, p0, Lcom/google/common/io/BaseEncoding$Base16Encoding;->encoding:[C
.line 4
invoke-static {p1}, Lcom/google/common/io/BaseEncoding$Alphabet;->access$000(Lcom/google/common/io/BaseEncoding$Alphabet;)[C
move-result-object v0
array-length v0, v0
const/4 v1, 0x0
const/16 v2, 0x10
if-ne v0, v2, :cond_0
const/4 v0, 0x1
goto :goto_0
:cond_0
move v0, v1
:goto_0
invoke-static {v0}, Lcom/google/common/base/Preconditions;->checkArgument(Z)V
:goto_1
const/16 v0, 0x100
if-ge v1, v0, :cond_1
.line 5
iget-object v0, p0, Lcom/google/common/io/BaseEncoding$Base16Encoding;->encoding:[C
ushr-int/lit8 v2, v1, 0x4
invoke-virtual {p1, v2}, Lcom/google/common/io/BaseEncoding$Alphabet;->encode(I)C
move-result v2
aput-char v2, v0, v1
.line 6
iget-object v0, p0, Lcom/google/common/io/BaseEncoding$Base16Encoding;->encoding:[C
or-int/lit16 v2, v1, 0x100
and-int/lit8 v3, v1, 0xf
invoke-virtual {p1, v3}, Lcom/google/common/io/BaseEncoding$Alphabet;->encode(I)C
move-result v3
aput-char v3, v0, v2
add-int/lit8 v1, v1, 0x1
goto :goto_1
:cond_1
return-void
.end method
.method public constructor <init>(Ljava/lang/String;Ljava/lang/String;)V
.locals 1
.line 1
new-instance v0, Lcom/google/common/io/BaseEncoding$Alphabet;
invoke-virtual {p2}, Ljava/lang/String;->toCharArray()[C
move-result-object p2
invoke-direct {v0, p1, p2}, Lcom/google/common/io/BaseEncoding$Alphabet;-><init>(Ljava/lang/String;[C)V
invoke-direct {p0, v0}, Lcom/google/common/io/BaseEncoding$Base16Encoding;-><init>(Lcom/google/common/io/BaseEncoding$Alphabet;)V
return-void
.end method
# virtual methods
.method public decodeTo([BLjava/lang/CharSequence;)I
.locals 5
.annotation system Ldalvik/annotation/Throws;
value = {
Lcom/google/common/io/BaseEncoding$DecodingException;
}
.end annotation
.line 1
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
.line 2
invoke-interface {p2}, Ljava/lang/CharSequence;->length()I
move-result v0
rem-int/lit8 v0, v0, 0x2
const/4 v1, 0x1
if-eq v0, v1, :cond_1
const/4 v0, 0x0
move v1, v0
.line 3
:goto_0
invoke-interface {p2}, Ljava/lang/CharSequence;->length()I
move-result v2
if-ge v0, v2, :cond_0
.line 4
iget-object v2, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding;->alphabet:Lcom/google/common/io/BaseEncoding$Alphabet;
invoke-interface {p2, v0}, Ljava/lang/CharSequence;->charAt(I)C
move-result v3
invoke-virtual {v2, v3}, Lcom/google/common/io/BaseEncoding$Alphabet;->decode(C)I
move-result v2
shl-int/lit8 v2, v2, 0x4
iget-object v3, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding;->alphabet:Lcom/google/common/io/BaseEncoding$Alphabet;
add-int/lit8 v4, v0, 0x1
invoke-interface {p2, v4}, Ljava/lang/CharSequence;->charAt(I)C
move-result v4
invoke-virtual {v3, v4}, Lcom/google/common/io/BaseEncoding$Alphabet;->decode(C)I
move-result v3
or-int/2addr v2, v3
add-int/lit8 v3, v1, 0x1
int-to-byte v2, v2
.line 5
aput-byte v2, p1, v1
add-int/lit8 v0, v0, 0x2
move v1, v3
goto :goto_0
:cond_0
return v1
.line 6
:cond_1
new-instance p1, Lcom/google/common/io/BaseEncoding$DecodingException;
invoke-interface {p2}, Ljava/lang/CharSequence;->length()I
move-result p2
const/16 v0, 0x20
const-string v1, "Invalid input length "
invoke-static {v0, v1, p2}, Lcom/google/android/gms/ads/a;->a(ILjava/lang/String;I)Ljava/lang/String;
move-result-object p2
invoke-direct {p1, p2}, Lcom/google/common/io/BaseEncoding$DecodingException;-><init>(Ljava/lang/String;)V
throw p1
.end method
.method public encodeTo(Ljava/lang/Appendable;[BII)V
.locals 3
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
add-int v0, p3, p4
.line 2
array-length v1, p2
invoke-static {p3, v0, v1}, Lcom/google/common/base/Preconditions;->checkPositionIndexes(III)V
const/4 v0, 0x0
:goto_0
if-ge v0, p4, :cond_0
add-int v1, p3, v0
.line 3
aget-byte v1, p2, v1
and-int/lit16 v1, v1, 0xff
.line 4
iget-object v2, p0, Lcom/google/common/io/BaseEncoding$Base16Encoding;->encoding:[C
aget-char v2, v2, v1
invoke-interface {p1, v2}, Ljava/lang/Appendable;->append(C)Ljava/lang/Appendable;
.line 5
iget-object v2, p0, Lcom/google/common/io/BaseEncoding$Base16Encoding;->encoding:[C
or-int/lit16 v1, v1, 0x100
aget-char v1, v2, v1
invoke-interface {p1, v1}, Ljava/lang/Appendable;->append(C)Ljava/lang/Appendable;
add-int/lit8 v0, v0, 0x1
goto :goto_0
:cond_0
return-void
.end method
.method public newInstance(Lcom/google/common/io/BaseEncoding$Alphabet;Ljava/lang/Character;)Lcom/google/common/io/BaseEncoding;
.locals 0
.param p2 # Ljava/lang/Character;
.annotation runtime Ljavax/annotation/CheckForNull;
.end annotation
.end param
.line 1
new-instance p2, Lcom/google/common/io/BaseEncoding$Base16Encoding;
invoke-direct {p2, p1}, Lcom/google/common/io/BaseEncoding$Base16Encoding;-><init>(Lcom/google/common/io/BaseEncoding$Alphabet;)V
return-object p2
.end method
@@ -0,0 +1,391 @@
.class final Lcom/google/common/io/BaseEncoding$Base64Encoding;
.super Lcom/google/common/io/BaseEncoding$StandardBaseEncoding;
.source "BaseEncoding.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/google/common/io/BaseEncoding;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = "Base64Encoding"
.end annotation
# direct methods
.method private constructor <init>(Lcom/google/common/io/BaseEncoding$Alphabet;Ljava/lang/Character;)V
.locals 0
.param p2 # Ljava/lang/Character;
.annotation runtime Ljavax/annotation/CheckForNull;
.end annotation
.end param
.line 2
invoke-direct {p0, p1, p2}, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding;-><init>(Lcom/google/common/io/BaseEncoding$Alphabet;Ljava/lang/Character;)V
.line 3
invoke-static {p1}, Lcom/google/common/io/BaseEncoding$Alphabet;->access$000(Lcom/google/common/io/BaseEncoding$Alphabet;)[C
move-result-object p1
array-length p1, p1
const/16 p2, 0x40
if-ne p1, p2, :cond_0
const/4 p1, 0x1
goto :goto_0
:cond_0
const/4 p1, 0x0
:goto_0
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkArgument(Z)V
return-void
.end method
.method public constructor <init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Character;)V
.locals 1
.param p3 # Ljava/lang/Character;
.annotation runtime Ljavax/annotation/CheckForNull;
.end annotation
.end param
.line 1
new-instance v0, Lcom/google/common/io/BaseEncoding$Alphabet;
invoke-virtual {p2}, Ljava/lang/String;->toCharArray()[C
move-result-object p2
invoke-direct {v0, p1, p2}, Lcom/google/common/io/BaseEncoding$Alphabet;-><init>(Ljava/lang/String;[C)V
invoke-direct {p0, v0, p3}, Lcom/google/common/io/BaseEncoding$Base64Encoding;-><init>(Lcom/google/common/io/BaseEncoding$Alphabet;Ljava/lang/Character;)V
return-void
.end method
# virtual methods
.method public decodeTo([BLjava/lang/CharSequence;)I
.locals 5
.annotation system Ldalvik/annotation/Throws;
value = {
Lcom/google/common/io/BaseEncoding$DecodingException;
}
.end annotation
.line 1
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
.line 2
invoke-virtual {p0, p2}, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding;->trimTrailingPadding(Ljava/lang/CharSequence;)Ljava/lang/CharSequence;
move-result-object p2
.line 3
iget-object v0, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding;->alphabet:Lcom/google/common/io/BaseEncoding$Alphabet;
invoke-interface {p2}, Ljava/lang/CharSequence;->length()I
move-result v1
invoke-virtual {v0, v1}, Lcom/google/common/io/BaseEncoding$Alphabet;->isValidPaddingStartPosition(I)Z
move-result v0
if-eqz v0, :cond_3
const/4 v0, 0x0
move v1, v0
.line 4
:goto_0
invoke-interface {p2}, Ljava/lang/CharSequence;->length()I
move-result v2
if-ge v0, v2, :cond_2
.line 5
iget-object v2, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding;->alphabet:Lcom/google/common/io/BaseEncoding$Alphabet;
add-int/lit8 v3, v0, 0x1
invoke-interface {p2, v0}, Ljava/lang/CharSequence;->charAt(I)C
move-result v0
invoke-virtual {v2, v0}, Lcom/google/common/io/BaseEncoding$Alphabet;->decode(C)I
move-result v0
shl-int/lit8 v0, v0, 0x12
.line 6
iget-object v2, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding;->alphabet:Lcom/google/common/io/BaseEncoding$Alphabet;
add-int/lit8 v4, v3, 0x1
invoke-interface {p2, v3}, Ljava/lang/CharSequence;->charAt(I)C
move-result v3
invoke-virtual {v2, v3}, Lcom/google/common/io/BaseEncoding$Alphabet;->decode(C)I
move-result v2
shl-int/lit8 v2, v2, 0xc
or-int/2addr v0, v2
add-int/lit8 v2, v1, 0x1
ushr-int/lit8 v3, v0, 0x10
int-to-byte v3, v3
.line 7
aput-byte v3, p1, v1
.line 8
invoke-interface {p2}, Ljava/lang/CharSequence;->length()I
move-result v1
if-ge v4, v1, :cond_1
.line 9
iget-object v1, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding;->alphabet:Lcom/google/common/io/BaseEncoding$Alphabet;
add-int/lit8 v3, v4, 0x1
invoke-interface {p2, v4}, Ljava/lang/CharSequence;->charAt(I)C
move-result v4
invoke-virtual {v1, v4}, Lcom/google/common/io/BaseEncoding$Alphabet;->decode(C)I
move-result v1
shl-int/lit8 v1, v1, 0x6
or-int/2addr v0, v1
add-int/lit8 v1, v2, 0x1
ushr-int/lit8 v4, v0, 0x8
and-int/lit16 v4, v4, 0xff
int-to-byte v4, v4
.line 10
aput-byte v4, p1, v2
.line 11
invoke-interface {p2}, Ljava/lang/CharSequence;->length()I
move-result v2
if-ge v3, v2, :cond_0
.line 12
iget-object v2, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding;->alphabet:Lcom/google/common/io/BaseEncoding$Alphabet;
add-int/lit8 v4, v3, 0x1
invoke-interface {p2, v3}, Ljava/lang/CharSequence;->charAt(I)C
move-result v3
invoke-virtual {v2, v3}, Lcom/google/common/io/BaseEncoding$Alphabet;->decode(C)I
move-result v2
or-int/2addr v0, v2
add-int/lit8 v2, v1, 0x1
and-int/lit16 v0, v0, 0xff
int-to-byte v0, v0
.line 13
aput-byte v0, p1, v1
goto :goto_1
:cond_0
move v0, v3
goto :goto_0
:cond_1
:goto_1
move v1, v2
move v0, v4
goto :goto_0
:cond_2
return v1
.line 14
:cond_3
new-instance p1, Lcom/google/common/io/BaseEncoding$DecodingException;
invoke-interface {p2}, Ljava/lang/CharSequence;->length()I
move-result p2
const/16 v0, 0x20
const-string v1, "Invalid input length "
invoke-static {v0, v1, p2}, Lcom/google/android/gms/ads/a;->a(ILjava/lang/String;I)Ljava/lang/String;
move-result-object p2
invoke-direct {p1, p2}, Lcom/google/common/io/BaseEncoding$DecodingException;-><init>(Ljava/lang/String;)V
throw p1
.end method
.method public encodeTo(Ljava/lang/Appendable;[BII)V
.locals 4
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
add-int v0, p3, p4
.line 2
array-length v1, p2
invoke-static {p3, v0, v1}, Lcom/google/common/base/Preconditions;->checkPositionIndexes(III)V
:goto_0
const/4 v1, 0x3
if-lt p4, v1, :cond_0
add-int/lit8 v1, p3, 0x1
.line 3
aget-byte p3, p2, p3
and-int/lit16 p3, p3, 0xff
shl-int/lit8 p3, p3, 0x10
add-int/lit8 v2, v1, 0x1
aget-byte v1, p2, v1
and-int/lit16 v1, v1, 0xff
shl-int/lit8 v1, v1, 0x8
or-int/2addr p3, v1
add-int/lit8 v1, v2, 0x1
aget-byte v2, p2, v2
and-int/lit16 v2, v2, 0xff
or-int/2addr p3, v2
.line 4
iget-object v2, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding;->alphabet:Lcom/google/common/io/BaseEncoding$Alphabet;
ushr-int/lit8 v3, p3, 0x12
invoke-virtual {v2, v3}, Lcom/google/common/io/BaseEncoding$Alphabet;->encode(I)C
move-result v2
invoke-interface {p1, v2}, Ljava/lang/Appendable;->append(C)Ljava/lang/Appendable;
.line 5
iget-object v2, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding;->alphabet:Lcom/google/common/io/BaseEncoding$Alphabet;
ushr-int/lit8 v3, p3, 0xc
and-int/lit8 v3, v3, 0x3f
invoke-virtual {v2, v3}, Lcom/google/common/io/BaseEncoding$Alphabet;->encode(I)C
move-result v2
invoke-interface {p1, v2}, Ljava/lang/Appendable;->append(C)Ljava/lang/Appendable;
.line 6
iget-object v2, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding;->alphabet:Lcom/google/common/io/BaseEncoding$Alphabet;
ushr-int/lit8 v3, p3, 0x6
and-int/lit8 v3, v3, 0x3f
invoke-virtual {v2, v3}, Lcom/google/common/io/BaseEncoding$Alphabet;->encode(I)C
move-result v2
invoke-interface {p1, v2}, Ljava/lang/Appendable;->append(C)Ljava/lang/Appendable;
.line 7
iget-object v2, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding;->alphabet:Lcom/google/common/io/BaseEncoding$Alphabet;
and-int/lit8 p3, p3, 0x3f
invoke-virtual {v2, p3}, Lcom/google/common/io/BaseEncoding$Alphabet;->encode(I)C
move-result p3
invoke-interface {p1, p3}, Ljava/lang/Appendable;->append(C)Ljava/lang/Appendable;
add-int/lit8 p4, p4, -0x3
move p3, v1
goto :goto_0
:cond_0
if-ge p3, v0, :cond_1
sub-int/2addr v0, p3
.line 8
invoke-virtual {p0, p1, p2, p3, v0}, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding;->encodeChunkTo(Ljava/lang/Appendable;[BII)V
:cond_1
return-void
.end method
.method public newInstance(Lcom/google/common/io/BaseEncoding$Alphabet;Ljava/lang/Character;)Lcom/google/common/io/BaseEncoding;
.locals 1
.param p2 # Ljava/lang/Character;
.annotation runtime Ljavax/annotation/CheckForNull;
.end annotation
.end param
.line 1
new-instance v0, Lcom/google/common/io/BaseEncoding$Base64Encoding;
invoke-direct {v0, p1, p2}, Lcom/google/common/io/BaseEncoding$Base64Encoding;-><init>(Lcom/google/common/io/BaseEncoding$Alphabet;Ljava/lang/Character;)V
return-object v0
.end method
@@ -0,0 +1,34 @@
.class public final Lcom/google/common/io/BaseEncoding$DecodingException;
.super Ljava/io/IOException;
.source "BaseEncoding.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/google/common/io/BaseEncoding;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = "DecodingException"
.end annotation
# direct methods
.method public constructor <init>(Ljava/lang/String;)V
.locals 0
.line 1
invoke-direct {p0, p1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
return-void
.end method
.method public constructor <init>(Ljava/lang/Throwable;)V
.locals 0
.line 2
invoke-direct {p0, p1}, Ljava/io/IOException;-><init>(Ljava/lang/Throwable;)V
return-void
.end method
@@ -0,0 +1,455 @@
.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 = 0x19
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;
# direct methods
.method public constructor <init>(Lcom/google/common/io/BaseEncoding;Ljava/lang/String;I)V
.locals 0
.line 1
invoke-direct {p0}, Lcom/google/common/io/BaseEncoding;-><init>()V
.line 2
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p1
check-cast p1, Lcom/google/common/io/BaseEncoding;
iput-object p1, p0, Lcom/google/common/io/BaseEncoding$SeparatedBaseEncoding;->delegate:Lcom/google/common/io/BaseEncoding;
.line 3
invoke-static {p2}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p1
check-cast p1, Ljava/lang/String;
iput-object p1, p0, Lcom/google/common/io/BaseEncoding$SeparatedBaseEncoding;->separator:Ljava/lang/String;
.line 4
iput p3, p0, Lcom/google/common/io/BaseEncoding$SeparatedBaseEncoding;->afterEveryChars:I
if-lez p3, :cond_0
const/4 p1, 0x1
goto :goto_0
:cond_0
const/4 p1, 0x0
:goto_0
const-string p2, "Cannot add a separator after every %s chars"
.line 5
invoke-static {p1, p2, p3}, Lcom/google/common/base/Preconditions;->checkArgument(ZLjava/lang/String;I)V
return-void
.end method
# virtual methods
.method public canDecode(Ljava/lang/CharSequence;)Z
.locals 4
.line 1
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
const/4 v1, 0x0
.line 2
:goto_0
invoke-interface {p1}, Ljava/lang/CharSequence;->length()I
move-result v2
if-ge v1, v2, :cond_1
.line 3
invoke-interface {p1, v1}, Ljava/lang/CharSequence;->charAt(I)C
move-result v2
.line 4
iget-object v3, p0, Lcom/google/common/io/BaseEncoding$SeparatedBaseEncoding;->separator:Ljava/lang/String;
invoke-virtual {v3, v2}, Ljava/lang/String;->indexOf(I)I
move-result v3
if-gez v3, :cond_0
.line 5
invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
:cond_0
add-int/lit8 v1, v1, 0x1
goto :goto_0
.line 6
:cond_1
iget-object p1, p0, Lcom/google/common/io/BaseEncoding$SeparatedBaseEncoding;->delegate:Lcom/google/common/io/BaseEncoding;
invoke-virtual {p1, v0}, Lcom/google/common/io/BaseEncoding;->canDecode(Ljava/lang/CharSequence;)Z
move-result p1
return p1
.end method
.method public decodeTo([BLjava/lang/CharSequence;)I
.locals 4
.annotation system Ldalvik/annotation/Throws;
value = {
Lcom/google/common/io/BaseEncoding$DecodingException;
}
.end annotation
.line 1
new-instance v0, Ljava/lang/StringBuilder;
invoke-interface {p2}, Ljava/lang/CharSequence;->length()I
move-result v1
invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(I)V
const/4 v1, 0x0
.line 2
:goto_0
invoke-interface {p2}, Ljava/lang/CharSequence;->length()I
move-result v2
if-ge v1, v2, :cond_1
.line 3
invoke-interface {p2, v1}, Ljava/lang/CharSequence;->charAt(I)C
move-result v2
.line 4
iget-object v3, p0, Lcom/google/common/io/BaseEncoding$SeparatedBaseEncoding;->separator:Ljava/lang/String;
invoke-virtual {v3, v2}, Ljava/lang/String;->indexOf(I)I
move-result v3
if-gez v3, :cond_0
.line 5
invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
:cond_0
add-int/lit8 v1, v1, 0x1
goto :goto_0
.line 6
:cond_1
iget-object p2, p0, Lcom/google/common/io/BaseEncoding$SeparatedBaseEncoding;->delegate:Lcom/google/common/io/BaseEncoding;
invoke-virtual {p2, p1, v0}, Lcom/google/common/io/BaseEncoding;->decodeTo([BLjava/lang/CharSequence;)I
move-result p1
return p1
.end method
.method public decodingStream(Ljava/io/Reader;)Ljava/io/InputStream;
.locals 2
.annotation build Lcom/google/common/annotations/GwtIncompatible;
.end annotation
.line 1
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;
invoke-static {p1, v1}, Lcom/google/common/io/BaseEncoding;->ignoringReader(Ljava/io/Reader;Ljava/lang/String;)Ljava/io/Reader;
move-result-object p1
invoke-virtual {v0, p1}, Lcom/google/common/io/BaseEncoding;->decodingStream(Ljava/io/Reader;)Ljava/io/InputStream;
move-result-object p1
return-object p1
.end method
.method public encodeTo(Ljava/lang/Appendable;[BII)V
.locals 3
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
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;->separatingAppendable(Ljava/lang/Appendable;Ljava/lang/String;I)Ljava/lang/Appendable;
move-result-object p1
invoke-virtual {v0, p1, p2, p3, p4}, Lcom/google/common/io/BaseEncoding;->encodeTo(Ljava/lang/Appendable;[BII)V
return-void
.end method
.method public encodingStream(Ljava/io/Writer;)Ljava/io/OutputStream;
.locals 3
.annotation build Lcom/google/common/annotations/GwtIncompatible;
.end annotation
.line 1
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;->separatingWriter(Ljava/io/Writer;Ljava/lang/String;I)Ljava/io/Writer;
move-result-object p1
invoke-virtual {v0, p1}, Lcom/google/common/io/BaseEncoding;->encodingStream(Ljava/io/Writer;)Ljava/io/OutputStream;
move-result-object p1
return-object p1
.end method
.method public lowerCase()Lcom/google/common/io/BaseEncoding;
.locals 3
.line 1
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 public maxDecodedSize(I)I
.locals 1
.line 1
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 p1
return p1
.end method
.method public maxEncodedSize(I)I
.locals 4
.line 1
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 p1
.line 2
iget-object v0, p0, Lcom/google/common/io/BaseEncoding$SeparatedBaseEncoding;->separator:Ljava/lang/String;
.line 3
invoke-virtual {v0}, Ljava/lang/String;->length()I
move-result v0
add-int/lit8 v1, p1, -0x1
const/4 v2, 0x0
invoke-static {v2, v1}, Ljava/lang/Math;->max(II)I
move-result v1
iget v2, p0, Lcom/google/common/io/BaseEncoding$SeparatedBaseEncoding;->afterEveryChars:I
sget-object v3, Ljava/math/RoundingMode;->FLOOR:Ljava/math/RoundingMode;
invoke-static {v1, v2, v3}, Lcom/google/common/math/IntMath;->divide(IILjava/math/RoundingMode;)I
move-result v1
mul-int/2addr v1, v0
add-int/2addr v1, p1
return v1
.end method
.method public omitPadding()Lcom/google/common/io/BaseEncoding;
.locals 3
.line 1
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 public toString()Ljava/lang/String;
.locals 6
.line 1
iget-object v0, p0, Lcom/google/common/io/BaseEncoding$SeparatedBaseEncoding;->delegate:Lcom/google/common/io/BaseEncoding;
invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
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}, Ljava/lang/String;->length()I
move-result v3
add-int/lit8 v3, v3, 0x1f
invoke-static {v1, v3}, Lcom/android/billingclient/api/d;->a(Ljava/lang/String;I)I
move-result v3
const-string v4, ".withSeparator(\""
const-string v5, "\", "
invoke-static {v3, v0, v4, v1, v5}, Lcom/google/ads/mediation/a;->a(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
const-string v1, ")"
invoke-static {v0, v2, v1}, Landroid/support/v4/media/c;->a(Ljava/lang/StringBuilder;ILjava/lang/String;)Ljava/lang/String;
move-result-object v0
return-object v0
.end method
.method public trimTrailingPadding(Ljava/lang/CharSequence;)Ljava/lang/CharSequence;
.locals 1
.line 1
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;->trimTrailingPadding(Ljava/lang/CharSequence;)Ljava/lang/CharSequence;
move-result-object p1
return-object p1
.end method
.method public upperCase()Lcom/google/common/io/BaseEncoding;
.locals 3
.line 1
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 2
.line 1
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 p1
iget-object v0, p0, Lcom/google/common/io/BaseEncoding$SeparatedBaseEncoding;->separator:Ljava/lang/String;
iget v1, p0, Lcom/google/common/io/BaseEncoding$SeparatedBaseEncoding;->afterEveryChars:I
invoke-virtual {p1, v0, v1}, Lcom/google/common/io/BaseEncoding;->withSeparator(Ljava/lang/String;I)Lcom/google/common/io/BaseEncoding;
move-result-object p1
return-object p1
.end method
.method public withSeparator(Ljava/lang/String;I)Lcom/google/common/io/BaseEncoding;
.locals 0
.line 1
new-instance p1, Ljava/lang/UnsupportedOperationException;
const-string p2, "Already have a separator"
invoke-direct {p1, p2}, Ljava/lang/UnsupportedOperationException;-><init>(Ljava/lang/String;)V
throw p1
.end method
@@ -0,0 +1,253 @@
.class Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$1;
.super Ljava/io/OutputStream;
.source "BaseEncoding.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
value = Lcom/google/common/io/BaseEncoding$StandardBaseEncoding;->encodingStream(Ljava/io/Writer;)Ljava/io/OutputStream;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1
name = null
.end annotation
# instance fields
.field public bitBuffer:I
.field public bitBufferLength:I
.field public final synthetic this$0:Lcom/google/common/io/BaseEncoding$StandardBaseEncoding;
.field public final synthetic val$out:Ljava/io/Writer;
.field public writtenChars:I
# direct methods
.method public constructor <init>(Lcom/google/common/io/BaseEncoding$StandardBaseEncoding;Ljava/io/Writer;)V
.locals 0
.line 1
iput-object p1, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$1;->this$0:Lcom/google/common/io/BaseEncoding$StandardBaseEncoding;
iput-object p2, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$1;->val$out:Ljava/io/Writer;
invoke-direct {p0}, Ljava/io/OutputStream;-><init>()V
const/4 p1, 0x0
.line 2
iput p1, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$1;->bitBuffer:I
.line 3
iput p1, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$1;->bitBufferLength:I
.line 4
iput p1, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$1;->writtenChars:I
return-void
.end method
# virtual methods
.method public close()V
.locals 4
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
iget v0, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$1;->bitBufferLength:I
if-lez v0, :cond_0
.line 2
iget v1, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$1;->bitBuffer:I
iget-object v2, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$1;->this$0:Lcom/google/common/io/BaseEncoding$StandardBaseEncoding;
iget-object v2, v2, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding;->alphabet:Lcom/google/common/io/BaseEncoding$Alphabet;
iget v3, v2, Lcom/google/common/io/BaseEncoding$Alphabet;->bitsPerChar:I
sub-int/2addr v3, v0
shl-int v0, v1, v3
iget v1, v2, Lcom/google/common/io/BaseEncoding$Alphabet;->mask:I
and-int/2addr v0, v1
.line 3
iget-object v1, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$1;->val$out:Ljava/io/Writer;
invoke-virtual {v2, v0}, Lcom/google/common/io/BaseEncoding$Alphabet;->encode(I)C
move-result v0
invoke-virtual {v1, v0}, Ljava/io/Writer;->write(I)V
.line 4
iget v0, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$1;->writtenChars:I
add-int/lit8 v0, v0, 0x1
iput v0, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$1;->writtenChars:I
.line 5
iget-object v0, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$1;->this$0:Lcom/google/common/io/BaseEncoding$StandardBaseEncoding;
iget-object v0, v0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding;->paddingChar:Ljava/lang/Character;
if-eqz v0, :cond_0
.line 6
:goto_0
iget v0, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$1;->writtenChars:I
iget-object v1, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$1;->this$0:Lcom/google/common/io/BaseEncoding$StandardBaseEncoding;
iget-object v2, v1, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding;->alphabet:Lcom/google/common/io/BaseEncoding$Alphabet;
iget v2, v2, Lcom/google/common/io/BaseEncoding$Alphabet;->charsPerChunk:I
rem-int/2addr v0, v2
if-eqz v0, :cond_0
.line 7
iget-object v0, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$1;->val$out:Ljava/io/Writer;
iget-object v1, v1, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding;->paddingChar:Ljava/lang/Character;
invoke-virtual {v1}, Ljava/lang/Character;->charValue()C
move-result v1
invoke-virtual {v0, v1}, Ljava/io/Writer;->write(I)V
.line 8
iget v0, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$1;->writtenChars:I
add-int/lit8 v0, v0, 0x1
iput v0, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$1;->writtenChars:I
goto :goto_0
.line 9
:cond_0
iget-object v0, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$1;->val$out:Ljava/io/Writer;
invoke-virtual {v0}, Ljava/io/Writer;->close()V
return-void
.end method
.method public flush()V
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
iget-object v0, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$1;->val$out:Ljava/io/Writer;
invoke-virtual {v0}, Ljava/io/Writer;->flush()V
return-void
.end method
.method public write(I)V
.locals 3
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
iget v0, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$1;->bitBuffer:I
shl-int/lit8 v0, v0, 0x8
iput v0, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$1;->bitBuffer:I
and-int/lit16 p1, p1, 0xff
or-int/2addr p1, v0
.line 2
iput p1, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$1;->bitBuffer:I
.line 3
iget p1, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$1;->bitBufferLength:I
add-int/lit8 p1, p1, 0x8
iput p1, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$1;->bitBufferLength:I
.line 4
:goto_0
iget p1, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$1;->bitBufferLength:I
iget-object v0, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$1;->this$0:Lcom/google/common/io/BaseEncoding$StandardBaseEncoding;
iget-object v0, v0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding;->alphabet:Lcom/google/common/io/BaseEncoding$Alphabet;
iget v1, v0, Lcom/google/common/io/BaseEncoding$Alphabet;->bitsPerChar:I
if-lt p1, v1, :cond_0
.line 5
iget v2, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$1;->bitBuffer:I
sub-int/2addr p1, v1
shr-int p1, v2, p1
iget v1, v0, Lcom/google/common/io/BaseEncoding$Alphabet;->mask:I
and-int/2addr p1, v1
.line 6
iget-object v1, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$1;->val$out:Ljava/io/Writer;
invoke-virtual {v0, p1}, Lcom/google/common/io/BaseEncoding$Alphabet;->encode(I)C
move-result p1
invoke-virtual {v1, p1}, Ljava/io/Writer;->write(I)V
.line 7
iget p1, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$1;->writtenChars:I
add-int/lit8 p1, p1, 0x1
iput p1, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$1;->writtenChars:I
.line 8
iget p1, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$1;->bitBufferLength:I
iget-object v0, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$1;->this$0:Lcom/google/common/io/BaseEncoding$StandardBaseEncoding;
iget-object v0, v0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding;->alphabet:Lcom/google/common/io/BaseEncoding$Alphabet;
iget v0, v0, Lcom/google/common/io/BaseEncoding$Alphabet;->bitsPerChar:I
sub-int/2addr p1, v0
iput p1, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$1;->bitBufferLength:I
goto :goto_0
:cond_0
return-void
.end method
@@ -0,0 +1,357 @@
.class Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$2;
.super Ljava/io/InputStream;
.source "BaseEncoding.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
value = Lcom/google/common/io/BaseEncoding$StandardBaseEncoding;->decodingStream(Ljava/io/Reader;)Ljava/io/InputStream;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1
name = null
.end annotation
# instance fields
.field public bitBuffer:I
.field public bitBufferLength:I
.field public hitPadding:Z
.field public readChars:I
.field public final synthetic this$0:Lcom/google/common/io/BaseEncoding$StandardBaseEncoding;
.field public final synthetic val$reader:Ljava/io/Reader;
# direct methods
.method public constructor <init>(Lcom/google/common/io/BaseEncoding$StandardBaseEncoding;Ljava/io/Reader;)V
.locals 0
.line 1
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:Ljava/io/Reader;
invoke-direct {p0}, Ljava/io/InputStream;-><init>()V
const/4 p1, 0x0
.line 2
iput p1, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$2;->bitBuffer:I
.line 3
iput p1, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$2;->bitBufferLength:I
.line 4
iput p1, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$2;->readChars:I
.line 5
iput-boolean p1, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$2;->hitPadding:Z
return-void
.end method
# virtual methods
.method public close()V
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
iget-object v0, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$2;->val$reader:Ljava/io/Reader;
invoke-virtual {v0}, Ljava/io/Reader;->close()V
return-void
.end method
.method public read()I
.locals 5
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
:cond_0
:goto_0
iget-object v0, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$2;->val$reader:Ljava/io/Reader;
invoke-virtual {v0}, Ljava/io/Reader;->read()I
move-result v0
const/4 v1, -0x1
if-ne v0, v1, :cond_3
.line 2
iget-boolean v0, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$2;->hitPadding:Z
if-nez v0, :cond_2
iget-object v0, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$2;->this$0:Lcom/google/common/io/BaseEncoding$StandardBaseEncoding;
iget-object v0, v0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding;->alphabet:Lcom/google/common/io/BaseEncoding$Alphabet;
iget v2, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$2;->readChars:I
invoke-virtual {v0, v2}, Lcom/google/common/io/BaseEncoding$Alphabet;->isValidPaddingStartPosition(I)Z
move-result v0
if-eqz v0, :cond_1
goto :goto_1
.line 3
:cond_1
new-instance v0, Lcom/google/common/io/BaseEncoding$DecodingException;
iget v1, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$2;->readChars:I
const/16 v2, 0x20
const-string v3, "Invalid input length "
invoke-static {v2, v3, v1}, Lcom/google/android/gms/ads/a;->a(ILjava/lang/String;I)Ljava/lang/String;
move-result-object v1
invoke-direct {v0, v1}, Lcom/google/common/io/BaseEncoding$DecodingException;-><init>(Ljava/lang/String;)V
throw v0
:cond_2
:goto_1
return v1
.line 4
:cond_3
iget v1, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$2;->readChars:I
const/4 v2, 0x1
add-int/2addr v1, v2
iput v1, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$2;->readChars:I
int-to-char v0, v0
.line 5
iget-object v1, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$2;->this$0:Lcom/google/common/io/BaseEncoding$StandardBaseEncoding;
iget-object v1, v1, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding;->paddingChar:Ljava/lang/Character;
if-eqz v1, :cond_6
invoke-virtual {v1}, Ljava/lang/Character;->charValue()C
move-result v1
if-ne v1, v0, :cond_6
.line 6
iget-boolean v0, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$2;->hitPadding:Z
if-nez v0, :cond_5
iget v0, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$2;->readChars:I
if-eq v0, v2, :cond_4
iget-object v1, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$2;->this$0:Lcom/google/common/io/BaseEncoding$StandardBaseEncoding;
iget-object v1, v1, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding;->alphabet:Lcom/google/common/io/BaseEncoding$Alphabet;
add-int/lit8 v0, v0, -0x1
.line 7
invoke-virtual {v1, v0}, Lcom/google/common/io/BaseEncoding$Alphabet;->isValidPaddingStartPosition(I)Z
move-result v0
if-eqz v0, :cond_4
goto :goto_2
.line 8
:cond_4
new-instance v0, Lcom/google/common/io/BaseEncoding$DecodingException;
iget v1, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$2;->readChars:I
const/16 v2, 0x29
const-string v3, "Padding cannot start at index "
invoke-static {v2, v3, v1}, Lcom/google/android/gms/ads/a;->a(ILjava/lang/String;I)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 9
:cond_5
:goto_2
iput-boolean v2, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$2;->hitPadding:Z
goto :goto_0
.line 10
:cond_6
iget-boolean v1, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$2;->hitPadding:Z
if-nez v1, :cond_7
.line 11
iget v1, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$2;->bitBuffer:I
iget-object v2, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$2;->this$0:Lcom/google/common/io/BaseEncoding$StandardBaseEncoding;
iget-object v2, v2, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding;->alphabet:Lcom/google/common/io/BaseEncoding$Alphabet;
iget v3, v2, Lcom/google/common/io/BaseEncoding$Alphabet;->bitsPerChar:I
shl-int/2addr v1, v3
iput v1, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$2;->bitBuffer:I
.line 12
invoke-virtual {v2, v0}, Lcom/google/common/io/BaseEncoding$Alphabet;->decode(C)I
move-result v0
or-int/2addr v0, v1
iput v0, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$2;->bitBuffer:I
.line 13
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;
iget-object v2, v2, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding;->alphabet:Lcom/google/common/io/BaseEncoding$Alphabet;
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
const/16 v2, 0x8
if-lt v1, v2, :cond_0
sub-int/2addr v1, v2
.line 14
iput v1, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$2;->bitBufferLength:I
shr-int/2addr v0, v1
and-int/lit16 v0, v0, 0xff
return v0
.line 15
:cond_7
new-instance v1, Lcom/google/common/io/BaseEncoding$DecodingException;
iget v2, p0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$2;->readChars:I
const/16 v3, 0x3d
new-instance v4, Ljava/lang/StringBuilder;
invoke-direct {v4, v3}, Ljava/lang/StringBuilder;-><init>(I)V
const-string v3, "Expected padding character but found \'"
invoke-virtual {v4, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v4, v0}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
const-string v0, "\' at index "
invoke-virtual {v4, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v4, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
invoke-direct {v1, v0}, Lcom/google/common/io/BaseEncoding$DecodingException;-><init>(Ljava/lang/String;)V
throw v1
.end method
.method public read([BII)I
.locals 3
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
add-int/2addr p3, p2
.line 16
array-length v0, p1
invoke-static {p2, p3, v0}, Lcom/google/common/base/Preconditions;->checkPositionIndexes(III)V
move v0, p2
:goto_0
if-ge v0, p3, :cond_2
.line 17
invoke-virtual {p0}, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding$2;->read()I
move-result v1
const/4 v2, -0x1
if-ne v1, v2, :cond_1
sub-int/2addr v0, p2
if-nez v0, :cond_0
goto :goto_1
:cond_0
move v2, v0
:goto_1
return v2
:cond_1
int-to-byte v1, v1
.line 18
aput-byte v1, p1, v0
add-int/lit8 v0, v0, 0x1
goto :goto_0
:cond_2
sub-int/2addr v0, p2
return v0
.end method
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,467 @@
.class public abstract Lcom/google/common/io/BaseEncoding;
.super Ljava/lang/Object;
.source "BaseEncoding.java"
# annotations
.annotation build Lcom/google/common/annotations/GwtCompatible;
emulated = true
.end annotation
.annotation runtime Lcom/google/common/io/ElementTypesAreNonnullByDefault;
.end annotation
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/google/common/io/BaseEncoding$SeparatedBaseEncoding;,
Lcom/google/common/io/BaseEncoding$Base64Encoding;,
Lcom/google/common/io/BaseEncoding$Base16Encoding;,
Lcom/google/common/io/BaseEncoding$StandardBaseEncoding;,
Lcom/google/common/io/BaseEncoding$Alphabet;,
Lcom/google/common/io/BaseEncoding$DecodingException;
}
.end annotation
# static fields
.field private static final BASE16:Lcom/google/common/io/BaseEncoding;
.field private static final BASE32:Lcom/google/common/io/BaseEncoding;
.field private static final BASE32_HEX:Lcom/google/common/io/BaseEncoding;
.field private static final BASE64:Lcom/google/common/io/BaseEncoding;
.field private static final BASE64_URL:Lcom/google/common/io/BaseEncoding;
# direct methods
.method public static constructor <clinit>()V
.locals 4
.line 1
new-instance v0, Lcom/google/common/io/BaseEncoding$Base64Encoding;
const/16 v1, 0x3d
.line 2
invoke-static {v1}, Ljava/lang/Character;->valueOf(C)Ljava/lang/Character;
move-result-object v1
const-string v2, "base64()"
const-string v3, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
invoke-direct {v0, v2, v3, v1}, Lcom/google/common/io/BaseEncoding$Base64Encoding;-><init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Character;)V
sput-object v0, Lcom/google/common/io/BaseEncoding;->BASE64:Lcom/google/common/io/BaseEncoding;
.line 3
new-instance v0, Lcom/google/common/io/BaseEncoding$Base64Encoding;
const-string v2, "base64Url()"
const-string v3, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"
.line 4
invoke-direct {v0, v2, v3, v1}, Lcom/google/common/io/BaseEncoding$Base64Encoding;-><init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Character;)V
sput-object v0, Lcom/google/common/io/BaseEncoding;->BASE64_URL:Lcom/google/common/io/BaseEncoding;
.line 5
new-instance v0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding;
const-string v2, "base32()"
const-string v3, "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"
.line 6
invoke-direct {v0, v2, v3, v1}, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding;-><init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Character;)V
sput-object v0, Lcom/google/common/io/BaseEncoding;->BASE32:Lcom/google/common/io/BaseEncoding;
.line 7
new-instance v0, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding;
const-string v2, "base32Hex()"
const-string v3, "0123456789ABCDEFGHIJKLMNOPQRSTUV"
.line 8
invoke-direct {v0, v2, v3, v1}, Lcom/google/common/io/BaseEncoding$StandardBaseEncoding;-><init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Character;)V
sput-object v0, Lcom/google/common/io/BaseEncoding;->BASE32_HEX:Lcom/google/common/io/BaseEncoding;
.line 9
new-instance v0, Lcom/google/common/io/BaseEncoding$Base16Encoding;
const-string v1, "base16()"
const-string v2, "0123456789ABCDEF"
invoke-direct {v0, v1, v2}, Lcom/google/common/io/BaseEncoding$Base16Encoding;-><init>(Ljava/lang/String;Ljava/lang/String;)V
sput-object v0, Lcom/google/common/io/BaseEncoding;->BASE16:Lcom/google/common/io/BaseEncoding;
return-void
.end method
.method public constructor <init>()V
.locals 0
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static base16()Lcom/google/common/io/BaseEncoding;
.locals 1
.line 1
sget-object v0, Lcom/google/common/io/BaseEncoding;->BASE16:Lcom/google/common/io/BaseEncoding;
return-object v0
.end method
.method public static base32()Lcom/google/common/io/BaseEncoding;
.locals 1
.line 1
sget-object v0, Lcom/google/common/io/BaseEncoding;->BASE32:Lcom/google/common/io/BaseEncoding;
return-object v0
.end method
.method public static base32Hex()Lcom/google/common/io/BaseEncoding;
.locals 1
.line 1
sget-object v0, Lcom/google/common/io/BaseEncoding;->BASE32_HEX:Lcom/google/common/io/BaseEncoding;
return-object v0
.end method
.method public static base64()Lcom/google/common/io/BaseEncoding;
.locals 1
.line 1
sget-object v0, Lcom/google/common/io/BaseEncoding;->BASE64:Lcom/google/common/io/BaseEncoding;
return-object v0
.end method
.method public static base64Url()Lcom/google/common/io/BaseEncoding;
.locals 1
.line 1
sget-object v0, Lcom/google/common/io/BaseEncoding;->BASE64_URL:Lcom/google/common/io/BaseEncoding;
return-object v0
.end method
.method private static extract([BI)[B
.locals 2
.line 1
array-length v0, p0
if-ne p1, v0, :cond_0
return-object p0
.line 2
:cond_0
new-array v0, p1, [B
const/4 v1, 0x0
.line 3
invoke-static {p0, v1, v0, v1, p1}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
return-object v0
.end method
.method public static ignoringReader(Ljava/io/Reader;Ljava/lang/String;)Ljava/io/Reader;
.locals 1
.annotation build Lcom/google/common/annotations/GwtIncompatible;
.end annotation
.line 1
invoke-static {p0}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
.line 2
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
.line 3
new-instance v0, Lcom/google/common/io/BaseEncoding$3;
invoke-direct {v0, p0, p1}, Lcom/google/common/io/BaseEncoding$3;-><init>(Ljava/io/Reader;Ljava/lang/String;)V
return-object v0
.end method
.method public static separatingAppendable(Ljava/lang/Appendable;Ljava/lang/String;I)Ljava/lang/Appendable;
.locals 1
.line 1
invoke-static {p0}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
.line 2
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
if-lez p2, :cond_0
const/4 v0, 0x1
goto :goto_0
:cond_0
const/4 v0, 0x0
.line 3
:goto_0
invoke-static {v0}, Lcom/google/common/base/Preconditions;->checkArgument(Z)V
.line 4
new-instance v0, Lcom/google/common/io/BaseEncoding$4;
invoke-direct {v0, p2, p0, p1}, Lcom/google/common/io/BaseEncoding$4;-><init>(ILjava/lang/Appendable;Ljava/lang/String;)V
return-object v0
.end method
.method public static separatingWriter(Ljava/io/Writer;Ljava/lang/String;I)Ljava/io/Writer;
.locals 0
.annotation build Lcom/google/common/annotations/GwtIncompatible;
.end annotation
.line 1
invoke-static {p0, p1, p2}, Lcom/google/common/io/BaseEncoding;->separatingAppendable(Ljava/lang/Appendable;Ljava/lang/String;I)Ljava/lang/Appendable;
move-result-object p1
.line 2
new-instance p2, Lcom/google/common/io/BaseEncoding$5;
invoke-direct {p2, p1, p0}, Lcom/google/common/io/BaseEncoding$5;-><init>(Ljava/lang/Appendable;Ljava/io/Writer;)V
return-object p2
.end method
# virtual methods
.method public abstract canDecode(Ljava/lang/CharSequence;)Z
.end method
.method public final decode(Ljava/lang/CharSequence;)[B
.locals 1
.line 1
:try_start_0
invoke-virtual {p0, p1}, Lcom/google/common/io/BaseEncoding;->decodeChecked(Ljava/lang/CharSequence;)[B
move-result-object p1
:try_end_0
.catch Lcom/google/common/io/BaseEncoding$DecodingException; {:try_start_0 .. :try_end_0} :catch_0
return-object p1
:catch_0
move-exception p1
.line 2
new-instance v0, Ljava/lang/IllegalArgumentException;
invoke-direct {v0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/Throwable;)V
throw v0
.end method
.method public final decodeChecked(Ljava/lang/CharSequence;)[B
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Lcom/google/common/io/BaseEncoding$DecodingException;
}
.end annotation
.line 1
invoke-virtual {p0, p1}, Lcom/google/common/io/BaseEncoding;->trimTrailingPadding(Ljava/lang/CharSequence;)Ljava/lang/CharSequence;
move-result-object p1
.line 2
invoke-interface {p1}, Ljava/lang/CharSequence;->length()I
move-result v0
invoke-virtual {p0, v0}, Lcom/google/common/io/BaseEncoding;->maxDecodedSize(I)I
move-result v0
new-array v0, v0, [B
.line 3
invoke-virtual {p0, v0, p1}, Lcom/google/common/io/BaseEncoding;->decodeTo([BLjava/lang/CharSequence;)I
move-result p1
.line 4
invoke-static {v0, p1}, Lcom/google/common/io/BaseEncoding;->extract([BI)[B
move-result-object p1
return-object p1
.end method
.method public abstract decodeTo([BLjava/lang/CharSequence;)I
.annotation system Ldalvik/annotation/Throws;
value = {
Lcom/google/common/io/BaseEncoding$DecodingException;
}
.end annotation
.end method
.method public final decodingSource(Lcom/google/common/io/CharSource;)Lcom/google/common/io/ByteSource;
.locals 1
.annotation build Lcom/google/common/annotations/GwtIncompatible;
.end annotation
.line 1
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
.line 2
new-instance v0, Lcom/google/common/io/BaseEncoding$2;
invoke-direct {v0, p0, p1}, Lcom/google/common/io/BaseEncoding$2;-><init>(Lcom/google/common/io/BaseEncoding;Lcom/google/common/io/CharSource;)V
return-object v0
.end method
.method public abstract decodingStream(Ljava/io/Reader;)Ljava/io/InputStream;
.annotation build Lcom/google/common/annotations/GwtIncompatible;
.end annotation
.end method
.method public encode([B)Ljava/lang/String;
.locals 2
.line 1
array-length v0, p1
const/4 v1, 0x0
invoke-virtual {p0, p1, v1, v0}, Lcom/google/common/io/BaseEncoding;->encode([BII)Ljava/lang/String;
move-result-object p1
return-object p1
.end method
.method public final encode([BII)Ljava/lang/String;
.locals 2
add-int v0, p2, p3
.line 2
array-length v1, p1
invoke-static {p2, v0, v1}, Lcom/google/common/base/Preconditions;->checkPositionIndexes(III)V
.line 3
new-instance v0, Ljava/lang/StringBuilder;
invoke-virtual {p0, p3}, Lcom/google/common/io/BaseEncoding;->maxEncodedSize(I)I
move-result v1
invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(I)V
.line 4
:try_start_0
invoke-virtual {p0, v0, p1, p2, p3}, Lcom/google/common/io/BaseEncoding;->encodeTo(Ljava/lang/Appendable;[BII)V
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
.line 5
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
return-object p1
:catch_0
move-exception p1
.line 6
new-instance p2, Ljava/lang/AssertionError;
invoke-direct {p2, p1}, Ljava/lang/AssertionError;-><init>(Ljava/lang/Object;)V
throw p2
.end method
.method public abstract encodeTo(Ljava/lang/Appendable;[BII)V
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.end method
.method public final encodingSink(Lcom/google/common/io/CharSink;)Lcom/google/common/io/ByteSink;
.locals 1
.annotation build Lcom/google/common/annotations/GwtIncompatible;
.end annotation
.line 1
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
.line 2
new-instance v0, Lcom/google/common/io/BaseEncoding$1;
invoke-direct {v0, p0, p1}, Lcom/google/common/io/BaseEncoding$1;-><init>(Lcom/google/common/io/BaseEncoding;Lcom/google/common/io/CharSink;)V
return-object v0
.end method
.method public abstract encodingStream(Ljava/io/Writer;)Ljava/io/OutputStream;
.annotation build Lcom/google/common/annotations/GwtIncompatible;
.end annotation
.end method
.method public abstract lowerCase()Lcom/google/common/io/BaseEncoding;
.end method
.method public abstract maxDecodedSize(I)I
.end method
.method public abstract maxEncodedSize(I)I
.end method
.method public abstract omitPadding()Lcom/google/common/io/BaseEncoding;
.end method
.method public trimTrailingPadding(Ljava/lang/CharSequence;)Ljava/lang/CharSequence;
.locals 0
.line 1
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p1
check-cast p1, Ljava/lang/CharSequence;
return-object p1
.end method
.method public abstract upperCase()Lcom/google/common/io/BaseEncoding;
.end method
.method public abstract withPadChar(C)Lcom/google/common/io/BaseEncoding;
.end method
.method public abstract withSeparator(Ljava/lang/String;I)Lcom/google/common/io/BaseEncoding;
.end method
@@ -0,0 +1,88 @@
.class public interface abstract Lcom/google/common/io/ByteArrayDataInput;
.super Ljava/lang/Object;
.source "ByteArrayDataInput.java"
# interfaces
.implements Ljava/io/DataInput;
# annotations
.annotation build Lcom/google/common/annotations/GwtIncompatible;
.end annotation
.annotation runtime Lcom/google/common/io/ElementTypesAreNonnullByDefault;
.end annotation
# virtual methods
.method public abstract readBoolean()Z
.annotation build Lcom/google/errorprone/annotations/CanIgnoreReturnValue;
.end annotation
.end method
.method public abstract readByte()B
.annotation build Lcom/google/errorprone/annotations/CanIgnoreReturnValue;
.end annotation
.end method
.method public abstract readChar()C
.annotation build Lcom/google/errorprone/annotations/CanIgnoreReturnValue;
.end annotation
.end method
.method public abstract readDouble()D
.annotation build Lcom/google/errorprone/annotations/CanIgnoreReturnValue;
.end annotation
.end method
.method public abstract readFloat()F
.annotation build Lcom/google/errorprone/annotations/CanIgnoreReturnValue;
.end annotation
.end method
.method public abstract readFully([B)V
.end method
.method public abstract readFully([BII)V
.end method
.method public abstract readInt()I
.annotation build Lcom/google/errorprone/annotations/CanIgnoreReturnValue;
.end annotation
.end method
.method public abstract readLine()Ljava/lang/String;
.annotation build Lcom/google/errorprone/annotations/CanIgnoreReturnValue;
.end annotation
.annotation runtime Ljavax/annotation/CheckForNull;
.end annotation
.end method
.method public abstract readLong()J
.annotation build Lcom/google/errorprone/annotations/CanIgnoreReturnValue;
.end annotation
.end method
.method public abstract readShort()S
.annotation build Lcom/google/errorprone/annotations/CanIgnoreReturnValue;
.end annotation
.end method
.method public abstract readUTF()Ljava/lang/String;
.annotation build Lcom/google/errorprone/annotations/CanIgnoreReturnValue;
.end annotation
.end method
.method public abstract readUnsignedByte()I
.annotation build Lcom/google/errorprone/annotations/CanIgnoreReturnValue;
.end annotation
.end method
.method public abstract readUnsignedShort()I
.annotation build Lcom/google/errorprone/annotations/CanIgnoreReturnValue;
.end annotation
.end method
.method public abstract skipBytes(I)I
.end method
@@ -0,0 +1,63 @@
.class public interface abstract Lcom/google/common/io/ByteArrayDataOutput;
.super Ljava/lang/Object;
.source "ByteArrayDataOutput.java"
# interfaces
.implements Ljava/io/DataOutput;
# annotations
.annotation build Lcom/google/common/annotations/GwtIncompatible;
.end annotation
.annotation runtime Lcom/google/common/io/ElementTypesAreNonnullByDefault;
.end annotation
# virtual methods
.method public abstract toByteArray()[B
.end method
.method public abstract write(I)V
.end method
.method public abstract write([B)V
.end method
.method public abstract write([BII)V
.end method
.method public abstract writeBoolean(Z)V
.end method
.method public abstract writeByte(I)V
.end method
.method public abstract writeBytes(Ljava/lang/String;)V
.annotation runtime Ljava/lang/Deprecated;
.end annotation
.end method
.method public abstract writeChar(I)V
.end method
.method public abstract writeChars(Ljava/lang/String;)V
.end method
.method public abstract writeDouble(D)V
.end method
.method public abstract writeFloat(F)V
.end method
.method public abstract writeInt(I)V
.end method
.method public abstract writeLong(J)V
.end method
.method public abstract writeShort(I)V
.end method
.method public abstract writeUTF(Ljava/lang/String;)V
.end method
@@ -0,0 +1,51 @@
.class public interface abstract Lcom/google/common/io/ByteProcessor;
.super Ljava/lang/Object;
.source "ByteProcessor.java"
# annotations
.annotation build Lcom/google/common/annotations/Beta;
.end annotation
.annotation build Lcom/google/common/annotations/GwtIncompatible;
.end annotation
.annotation runtime Lcom/google/common/io/ElementTypesAreNonnullByDefault;
.end annotation
.annotation runtime Lcom/google/errorprone/annotations/DoNotMock;
value = "Implement it normally"
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">",
"Ljava/lang/Object;"
}
.end annotation
# virtual methods
.method public abstract getResult()Ljava/lang/Object;
.annotation runtime Lcom/google/common/io/ParametricNullness;
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"()TT;"
}
.end annotation
.end method
.method public abstract processBytes([BII)Z
.annotation build Lcom/google/errorprone/annotations/CanIgnoreReturnValue;
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.end method
@@ -0,0 +1,14 @@
.class synthetic Lcom/google/common/io/ByteSink$1;
.super Ljava/lang/Object;
.source "ByteSink.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/google/common/io/ByteSink;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1009
name = null
.end annotation
@@ -0,0 +1,116 @@
.class final Lcom/google/common/io/ByteSink$AsCharSink;
.super Lcom/google/common/io/CharSink;
.source "ByteSink.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/google/common/io/ByteSink;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x11
name = "AsCharSink"
.end annotation
# instance fields
.field private final charset:Ljava/nio/charset/Charset;
.field public final synthetic this$0:Lcom/google/common/io/ByteSink;
# direct methods
.method private constructor <init>(Lcom/google/common/io/ByteSink;Ljava/nio/charset/Charset;)V
.locals 0
.line 2
iput-object p1, p0, Lcom/google/common/io/ByteSink$AsCharSink;->this$0:Lcom/google/common/io/ByteSink;
invoke-direct {p0}, Lcom/google/common/io/CharSink;-><init>()V
.line 3
invoke-static {p2}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p1
check-cast p1, Ljava/nio/charset/Charset;
iput-object p1, p0, Lcom/google/common/io/ByteSink$AsCharSink;->charset:Ljava/nio/charset/Charset;
return-void
.end method
.method public synthetic constructor <init>(Lcom/google/common/io/ByteSink;Ljava/nio/charset/Charset;Lcom/google/common/io/ByteSink$1;)V
.locals 0
.line 1
invoke-direct {p0, p1, p2}, Lcom/google/common/io/ByteSink$AsCharSink;-><init>(Lcom/google/common/io/ByteSink;Ljava/nio/charset/Charset;)V
return-void
.end method
# virtual methods
.method public openStream()Ljava/io/Writer;
.locals 3
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
new-instance v0, Ljava/io/OutputStreamWriter;
iget-object v1, p0, Lcom/google/common/io/ByteSink$AsCharSink;->this$0:Lcom/google/common/io/ByteSink;
invoke-virtual {v1}, Lcom/google/common/io/ByteSink;->openStream()Ljava/io/OutputStream;
move-result-object v1
iget-object v2, p0, Lcom/google/common/io/ByteSink$AsCharSink;->charset:Ljava/nio/charset/Charset;
invoke-direct {v0, v1, v2}, Ljava/io/OutputStreamWriter;-><init>(Ljava/io/OutputStream;Ljava/nio/charset/Charset;)V
return-object v0
.end method
.method public toString()Ljava/lang/String;
.locals 5
.line 1
iget-object v0, p0, Lcom/google/common/io/ByteSink$AsCharSink;->this$0:Lcom/google/common/io/ByteSink;
invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object v0
iget-object v1, p0, Lcom/google/common/io/ByteSink$AsCharSink;->charset:Ljava/nio/charset/Charset;
invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
move-result-object v1
const/16 v2, 0xd
invoke-static {v0, v2}, Lcom/android/billingclient/api/d;->a(Ljava/lang/String;I)I
move-result v2
invoke-virtual {v1}, Ljava/lang/String;->length()I
move-result v3
add-int/2addr v3, v2
const-string v2, ".asCharSink("
const-string v4, ")"
invoke-static {v3, v0, v2, v1, v4}, Lcom/android/billingclient/api/f;->a(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
return-object v0
.end method
@@ -0,0 +1,219 @@
.class public abstract Lcom/google/common/io/ByteSink;
.super Ljava/lang/Object;
.source "ByteSink.java"
# annotations
.annotation build Lcom/google/common/annotations/GwtIncompatible;
.end annotation
.annotation runtime Lcom/google/common/io/ElementTypesAreNonnullByDefault;
.end annotation
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/google/common/io/ByteSink$AsCharSink;
}
.end annotation
# direct methods
.method public constructor <init>()V
.locals 0
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
# virtual methods
.method public asCharSink(Ljava/nio/charset/Charset;)Lcom/google/common/io/CharSink;
.locals 2
.line 1
new-instance v0, Lcom/google/common/io/ByteSink$AsCharSink;
const/4 v1, 0x0
invoke-direct {v0, p0, p1, v1}, Lcom/google/common/io/ByteSink$AsCharSink;-><init>(Lcom/google/common/io/ByteSink;Ljava/nio/charset/Charset;Lcom/google/common/io/ByteSink$1;)V
return-object v0
.end method
.method public openBufferedStream()Ljava/io/OutputStream;
.locals 2
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
invoke-virtual {p0}, Lcom/google/common/io/ByteSink;->openStream()Ljava/io/OutputStream;
move-result-object v0
.line 2
instance-of v1, v0, Ljava/io/BufferedOutputStream;
if-eqz v1, :cond_0
.line 3
check-cast v0, Ljava/io/BufferedOutputStream;
goto :goto_0
.line 4
:cond_0
new-instance v1, Ljava/io/BufferedOutputStream;
invoke-direct {v1, v0}, Ljava/io/BufferedOutputStream;-><init>(Ljava/io/OutputStream;)V
move-object v0, v1
:goto_0
return-object v0
.end method
.method public abstract openStream()Ljava/io/OutputStream;
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.end method
.method public write([B)V
.locals 2
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
.line 2
invoke-static {}, Lcom/google/common/io/Closer;->create()Lcom/google/common/io/Closer;
move-result-object v0
.line 3
:try_start_0
invoke-virtual {p0}, Lcom/google/common/io/ByteSink;->openStream()Ljava/io/OutputStream;
move-result-object v1
invoke-virtual {v0, v1}, Lcom/google/common/io/Closer;->register(Ljava/io/Closeable;)Ljava/io/Closeable;
move-result-object v1
check-cast v1, Ljava/io/OutputStream;
.line 4
invoke-virtual {v1, p1}, Ljava/io/OutputStream;->write([B)V
.line 5
invoke-virtual {v1}, Ljava/io/OutputStream;->flush()V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 6
invoke-virtual {v0}, Lcom/google/common/io/Closer;->close()V
return-void
:catchall_0
move-exception p1
.line 7
:try_start_1
invoke-virtual {v0, p1}, Lcom/google/common/io/Closer;->rethrow(Ljava/lang/Throwable;)Ljava/lang/RuntimeException;
move-result-object p1
throw p1
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_1
:catchall_1
move-exception p1
.line 8
invoke-virtual {v0}, Lcom/google/common/io/Closer;->close()V
.line 9
throw p1
.end method
.method public writeFrom(Ljava/io/InputStream;)J
.locals 4
.annotation build Lcom/google/errorprone/annotations/CanIgnoreReturnValue;
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
.line 2
invoke-static {}, Lcom/google/common/io/Closer;->create()Lcom/google/common/io/Closer;
move-result-object v0
.line 3
:try_start_0
invoke-virtual {p0}, Lcom/google/common/io/ByteSink;->openStream()Ljava/io/OutputStream;
move-result-object v1
invoke-virtual {v0, v1}, Lcom/google/common/io/Closer;->register(Ljava/io/Closeable;)Ljava/io/Closeable;
move-result-object v1
check-cast v1, Ljava/io/OutputStream;
.line 4
invoke-static {p1, v1}, Lcom/google/common/io/ByteStreams;->copy(Ljava/io/InputStream;Ljava/io/OutputStream;)J
move-result-wide v2
.line 5
invoke-virtual {v1}, Ljava/io/OutputStream;->flush()V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 6
invoke-virtual {v0}, Lcom/google/common/io/Closer;->close()V
return-wide v2
:catchall_0
move-exception p1
.line 7
:try_start_1
invoke-virtual {v0, p1}, Lcom/google/common/io/Closer;->rethrow(Ljava/lang/Throwable;)Ljava/lang/RuntimeException;
move-result-object p1
throw p1
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_1
:catchall_1
move-exception p1
.line 8
invoke-virtual {v0}, Lcom/google/common/io/Closer;->close()V
.line 9
throw p1
.end method
@@ -0,0 +1,157 @@
.class Lcom/google/common/io/ByteSource$AsCharSource;
.super Lcom/google/common/io/CharSource;
.source "ByteSource.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/google/common/io/ByteSource;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1
name = "AsCharSource"
.end annotation
# instance fields
.field public final charset:Ljava/nio/charset/Charset;
.field public final synthetic this$0:Lcom/google/common/io/ByteSource;
# direct methods
.method public constructor <init>(Lcom/google/common/io/ByteSource;Ljava/nio/charset/Charset;)V
.locals 0
.line 1
iput-object p1, p0, Lcom/google/common/io/ByteSource$AsCharSource;->this$0:Lcom/google/common/io/ByteSource;
invoke-direct {p0}, Lcom/google/common/io/CharSource;-><init>()V
.line 2
invoke-static {p2}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p1
check-cast p1, Ljava/nio/charset/Charset;
iput-object p1, p0, Lcom/google/common/io/ByteSource$AsCharSource;->charset:Ljava/nio/charset/Charset;
return-void
.end method
# virtual methods
.method public asByteSource(Ljava/nio/charset/Charset;)Lcom/google/common/io/ByteSource;
.locals 1
.line 1
iget-object v0, p0, Lcom/google/common/io/ByteSource$AsCharSource;->charset:Ljava/nio/charset/Charset;
invoke-virtual {p1, v0}, Ljava/nio/charset/Charset;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_0
.line 2
iget-object p1, p0, Lcom/google/common/io/ByteSource$AsCharSource;->this$0:Lcom/google/common/io/ByteSource;
return-object p1
.line 3
:cond_0
invoke-super {p0, p1}, Lcom/google/common/io/CharSource;->asByteSource(Ljava/nio/charset/Charset;)Lcom/google/common/io/ByteSource;
move-result-object p1
return-object p1
.end method
.method public openStream()Ljava/io/Reader;
.locals 3
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
new-instance v0, Ljava/io/InputStreamReader;
iget-object v1, p0, Lcom/google/common/io/ByteSource$AsCharSource;->this$0:Lcom/google/common/io/ByteSource;
invoke-virtual {v1}, Lcom/google/common/io/ByteSource;->openStream()Ljava/io/InputStream;
move-result-object v1
iget-object v2, p0, Lcom/google/common/io/ByteSource$AsCharSource;->charset:Ljava/nio/charset/Charset;
invoke-direct {v0, v1, v2}, Ljava/io/InputStreamReader;-><init>(Ljava/io/InputStream;Ljava/nio/charset/Charset;)V
return-object v0
.end method
.method public read()Ljava/lang/String;
.locals 3
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
new-instance v0, Ljava/lang/String;
iget-object v1, p0, Lcom/google/common/io/ByteSource$AsCharSource;->this$0:Lcom/google/common/io/ByteSource;
invoke-virtual {v1}, Lcom/google/common/io/ByteSource;->read()[B
move-result-object v1
iget-object v2, p0, Lcom/google/common/io/ByteSource$AsCharSource;->charset:Ljava/nio/charset/Charset;
invoke-direct {v0, v1, v2}, Ljava/lang/String;-><init>([BLjava/nio/charset/Charset;)V
return-object v0
.end method
.method public toString()Ljava/lang/String;
.locals 5
.line 1
iget-object v0, p0, Lcom/google/common/io/ByteSource$AsCharSource;->this$0:Lcom/google/common/io/ByteSource;
invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object v0
iget-object v1, p0, Lcom/google/common/io/ByteSource$AsCharSource;->charset:Ljava/nio/charset/Charset;
invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
move-result-object v1
const/16 v2, 0xf
invoke-static {v0, v2}, Lcom/android/billingclient/api/d;->a(Ljava/lang/String;I)I
move-result v2
invoke-virtual {v1}, Ljava/lang/String;->length()I
move-result v3
add-int/2addr v3, v2
const-string v2, ".asCharSource("
const-string v4, ")"
invoke-static {v3, v0, v2, v1, v4}, Lcom/android/billingclient/api/f;->a(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
return-object v0
.end method
@@ -0,0 +1,374 @@
.class Lcom/google/common/io/ByteSource$ByteArrayByteSource;
.super Lcom/google/common/io/ByteSource;
.source "ByteSource.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/google/common/io/ByteSource;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x9
name = "ByteArrayByteSource"
.end annotation
# instance fields
.field public final bytes:[B
.field public final length:I
.field public final offset:I
# direct methods
.method public constructor <init>([B)V
.locals 2
.line 1
array-length v0, p1
const/4 v1, 0x0
invoke-direct {p0, p1, v1, v0}, Lcom/google/common/io/ByteSource$ByteArrayByteSource;-><init>([BII)V
return-void
.end method
.method public constructor <init>([BII)V
.locals 0
.line 2
invoke-direct {p0}, Lcom/google/common/io/ByteSource;-><init>()V
.line 3
iput-object p1, p0, Lcom/google/common/io/ByteSource$ByteArrayByteSource;->bytes:[B
.line 4
iput p2, p0, Lcom/google/common/io/ByteSource$ByteArrayByteSource;->offset:I
.line 5
iput p3, p0, Lcom/google/common/io/ByteSource$ByteArrayByteSource;->length:I
return-void
.end method
# virtual methods
.method public copyTo(Ljava/io/OutputStream;)J
.locals 3
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
iget-object v0, p0, Lcom/google/common/io/ByteSource$ByteArrayByteSource;->bytes:[B
iget v1, p0, Lcom/google/common/io/ByteSource$ByteArrayByteSource;->offset:I
iget v2, p0, Lcom/google/common/io/ByteSource$ByteArrayByteSource;->length:I
invoke-virtual {p1, v0, v1, v2}, Ljava/io/OutputStream;->write([BII)V
.line 2
iget p1, p0, Lcom/google/common/io/ByteSource$ByteArrayByteSource;->length:I
int-to-long v0, p1
return-wide v0
.end method
.method public hash(Lcom/google/common/hash/HashFunction;)Lcom/google/common/hash/HashCode;
.locals 3
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
iget-object v0, p0, Lcom/google/common/io/ByteSource$ByteArrayByteSource;->bytes:[B
iget v1, p0, Lcom/google/common/io/ByteSource$ByteArrayByteSource;->offset:I
iget v2, p0, Lcom/google/common/io/ByteSource$ByteArrayByteSource;->length:I
invoke-interface {p1, v0, v1, v2}, Lcom/google/common/hash/HashFunction;->hashBytes([BII)Lcom/google/common/hash/HashCode;
move-result-object p1
return-object p1
.end method
.method public isEmpty()Z
.locals 1
.line 1
iget v0, p0, Lcom/google/common/io/ByteSource$ByteArrayByteSource;->length:I
if-nez v0, :cond_0
const/4 v0, 0x1
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
return v0
.end method
.method public openBufferedStream()Ljava/io/InputStream;
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
invoke-virtual {p0}, Lcom/google/common/io/ByteSource$ByteArrayByteSource;->openStream()Ljava/io/InputStream;
move-result-object v0
return-object v0
.end method
.method public openStream()Ljava/io/InputStream;
.locals 4
.line 1
new-instance v0, Ljava/io/ByteArrayInputStream;
iget-object v1, p0, Lcom/google/common/io/ByteSource$ByteArrayByteSource;->bytes:[B
iget v2, p0, Lcom/google/common/io/ByteSource$ByteArrayByteSource;->offset:I
iget v3, p0, Lcom/google/common/io/ByteSource$ByteArrayByteSource;->length:I
invoke-direct {v0, v1, v2, v3}, Ljava/io/ByteArrayInputStream;-><init>([BII)V
return-object v0
.end method
.method public read(Lcom/google/common/io/ByteProcessor;)Ljava/lang/Object;
.locals 3
.annotation runtime Lcom/google/common/io/ParametricNullness;
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">(",
"Lcom/google/common/io/ByteProcessor<",
"TT;>;)TT;"
}
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 2
iget-object v0, p0, Lcom/google/common/io/ByteSource$ByteArrayByteSource;->bytes:[B
iget v1, p0, Lcom/google/common/io/ByteSource$ByteArrayByteSource;->offset:I
iget v2, p0, Lcom/google/common/io/ByteSource$ByteArrayByteSource;->length:I
invoke-interface {p1, v0, v1, v2}, Lcom/google/common/io/ByteProcessor;->processBytes([BII)Z
.line 3
invoke-interface {p1}, Lcom/google/common/io/ByteProcessor;->getResult()Ljava/lang/Object;
move-result-object p1
return-object p1
.end method
.method public read()[B
.locals 3
.line 1
iget-object v0, p0, Lcom/google/common/io/ByteSource$ByteArrayByteSource;->bytes:[B
iget v1, p0, Lcom/google/common/io/ByteSource$ByteArrayByteSource;->offset:I
iget v2, p0, Lcom/google/common/io/ByteSource$ByteArrayByteSource;->length:I
add-int/2addr v2, v1
invoke-static {v0, v1, v2}, Ljava/util/Arrays;->copyOfRange([BII)[B
move-result-object v0
return-object v0
.end method
.method public size()J
.locals 2
.line 1
iget v0, p0, Lcom/google/common/io/ByteSource$ByteArrayByteSource;->length:I
int-to-long v0, v0
return-wide v0
.end method
.method public sizeIfKnown()Lcom/google/common/base/Optional;
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Lcom/google/common/base/Optional<",
"Ljava/lang/Long;",
">;"
}
.end annotation
.line 1
iget v0, p0, Lcom/google/common/io/ByteSource$ByteArrayByteSource;->length:I
int-to-long v0, v0
invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
move-result-object v0
invoke-static {v0}, Lcom/google/common/base/Optional;->of(Ljava/lang/Object;)Lcom/google/common/base/Optional;
move-result-object v0
return-object v0
.end method
.method public slice(JJ)Lcom/google/common/io/ByteSource;
.locals 6
const-wide/16 v0, 0x0
cmp-long v2, p1, v0
const/4 v3, 0x1
const/4 v4, 0x0
if-ltz v2, :cond_0
move v2, v3
goto :goto_0
:cond_0
move v2, v4
:goto_0
const-string v5, "offset (%s) may not be negative"
.line 1
invoke-static {v2, v5, p1, p2}, Lcom/google/common/base/Preconditions;->checkArgument(ZLjava/lang/String;J)V
cmp-long v0, p3, v0
if-ltz v0, :cond_1
goto :goto_1
:cond_1
move v3, v4
:goto_1
const-string v0, "length (%s) may not be negative"
.line 2
invoke-static {v3, v0, p3, p4}, Lcom/google/common/base/Preconditions;->checkArgument(ZLjava/lang/String;J)V
.line 3
iget v0, p0, Lcom/google/common/io/ByteSource$ByteArrayByteSource;->length:I
int-to-long v0, v0
invoke-static {p1, p2, v0, v1}, Ljava/lang/Math;->min(JJ)J
move-result-wide p1
.line 4
iget v0, p0, Lcom/google/common/io/ByteSource$ByteArrayByteSource;->length:I
int-to-long v0, v0
sub-long/2addr v0, p1
invoke-static {p3, p4, v0, v1}, Ljava/lang/Math;->min(JJ)J
move-result-wide p3
.line 5
iget v0, p0, Lcom/google/common/io/ByteSource$ByteArrayByteSource;->offset:I
long-to-int p1, p1
add-int/2addr v0, p1
.line 6
new-instance p1, Lcom/google/common/io/ByteSource$ByteArrayByteSource;
iget-object p2, p0, Lcom/google/common/io/ByteSource$ByteArrayByteSource;->bytes:[B
long-to-int p3, p3
invoke-direct {p1, p2, v0, p3}, Lcom/google/common/io/ByteSource$ByteArrayByteSource;-><init>([BII)V
return-object p1
.end method
.method public toString()Ljava/lang/String;
.locals 4
.line 1
invoke-static {}, Lcom/google/common/io/BaseEncoding;->base16()Lcom/google/common/io/BaseEncoding;
move-result-object v0
iget-object v1, p0, Lcom/google/common/io/ByteSource$ByteArrayByteSource;->bytes:[B
iget v2, p0, Lcom/google/common/io/ByteSource$ByteArrayByteSource;->offset:I
iget v3, p0, Lcom/google/common/io/ByteSource$ByteArrayByteSource;->length:I
invoke-virtual {v0, v1, v2, v3}, Lcom/google/common/io/BaseEncoding;->encode([BII)Ljava/lang/String;
move-result-object v0
const/16 v1, 0x1e
const-string v2, "..."
invoke-static {v0, v1, v2}, Lcom/google/common/base/Ascii;->truncate(Ljava/lang/CharSequence;ILjava/lang/String;)Ljava/lang/String;
move-result-object v0
const/16 v1, 0x11
invoke-static {v0, v1}, Lcom/android/billingclient/api/d;->a(Ljava/lang/String;I)I
move-result v1
const-string v2, "ByteSource.wrap("
const-string v3, ")"
invoke-static {v1, v2, v0, v3}, Lcom/google/android/gms/ads/internal/a;->a(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
return-object v0
.end method
@@ -0,0 +1,314 @@
.class final Lcom/google/common/io/ByteSource$ConcatenatedByteSource;
.super Lcom/google/common/io/ByteSource;
.source "ByteSource.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/google/common/io/ByteSource;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = "ConcatenatedByteSource"
.end annotation
# instance fields
.field public final sources:Ljava/lang/Iterable;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/lang/Iterable<",
"+",
"Lcom/google/common/io/ByteSource;",
">;"
}
.end annotation
.end field
# direct methods
.method public constructor <init>(Ljava/lang/Iterable;)V
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/Iterable<",
"+",
"Lcom/google/common/io/ByteSource;",
">;)V"
}
.end annotation
.line 1
invoke-direct {p0}, Lcom/google/common/io/ByteSource;-><init>()V
.line 2
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p1
check-cast p1, Ljava/lang/Iterable;
iput-object p1, p0, Lcom/google/common/io/ByteSource$ConcatenatedByteSource;->sources:Ljava/lang/Iterable;
return-void
.end method
# virtual methods
.method public isEmpty()Z
.locals 2
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
iget-object v0, p0, Lcom/google/common/io/ByteSource$ConcatenatedByteSource;->sources:Ljava/lang/Iterable;
invoke-interface {v0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
move-result-object v0
:cond_0
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v1
if-eqz v1, :cond_1
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v1
check-cast v1, Lcom/google/common/io/ByteSource;
.line 2
invoke-virtual {v1}, Lcom/google/common/io/ByteSource;->isEmpty()Z
move-result v1
if-nez v1, :cond_0
const/4 v0, 0x0
return v0
:cond_1
const/4 v0, 0x1
return v0
.end method
.method public openStream()Ljava/io/InputStream;
.locals 2
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
new-instance v0, Lcom/google/common/io/MultiInputStream;
iget-object v1, p0, Lcom/google/common/io/ByteSource$ConcatenatedByteSource;->sources:Ljava/lang/Iterable;
invoke-interface {v1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
move-result-object v1
invoke-direct {v0, v1}, Lcom/google/common/io/MultiInputStream;-><init>(Ljava/util/Iterator;)V
return-object v0
.end method
.method public size()J
.locals 7
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
iget-object v0, p0, Lcom/google/common/io/ByteSource$ConcatenatedByteSource;->sources:Ljava/lang/Iterable;
invoke-interface {v0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
move-result-object v0
const-wide/16 v1, 0x0
move-wide v3, v1
:cond_0
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v5
if-eqz v5, :cond_1
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v5
check-cast v5, Lcom/google/common/io/ByteSource;
.line 2
invoke-virtual {v5}, Lcom/google/common/io/ByteSource;->size()J
move-result-wide v5
add-long/2addr v3, v5
cmp-long v5, v3, v1
if-gez v5, :cond_0
const-wide v0, 0x7fffffffffffffffL
return-wide v0
:cond_1
return-wide v3
.end method
.method public sizeIfKnown()Lcom/google/common/base/Optional;
.locals 7
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Lcom/google/common/base/Optional<",
"Ljava/lang/Long;",
">;"
}
.end annotation
.line 1
iget-object v0, p0, Lcom/google/common/io/ByteSource$ConcatenatedByteSource;->sources:Ljava/lang/Iterable;
instance-of v1, v0, Ljava/util/Collection;
if-nez v1, :cond_0
.line 2
invoke-static {}, Lcom/google/common/base/Optional;->absent()Lcom/google/common/base/Optional;
move-result-object v0
return-object v0
.line 3
:cond_0
invoke-interface {v0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
move-result-object v0
const-wide/16 v1, 0x0
move-wide v3, v1
:cond_1
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v5
if-eqz v5, :cond_3
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v5
check-cast v5, Lcom/google/common/io/ByteSource;
.line 4
invoke-virtual {v5}, Lcom/google/common/io/ByteSource;->sizeIfKnown()Lcom/google/common/base/Optional;
move-result-object v5
.line 5
invoke-virtual {v5}, Lcom/google/common/base/Optional;->isPresent()Z
move-result v6
if-nez v6, :cond_2
.line 6
invoke-static {}, Lcom/google/common/base/Optional;->absent()Lcom/google/common/base/Optional;
move-result-object v0
return-object v0
.line 7
:cond_2
invoke-virtual {v5}, Lcom/google/common/base/Optional;->get()Ljava/lang/Object;
move-result-object v5
check-cast v5, Ljava/lang/Long;
invoke-virtual {v5}, Ljava/lang/Long;->longValue()J
move-result-wide v5
add-long/2addr v3, v5
cmp-long v5, v3, v1
if-gez v5, :cond_1
const-wide v0, 0x7fffffffffffffffL
.line 8
invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
move-result-object v0
invoke-static {v0}, Lcom/google/common/base/Optional;->of(Ljava/lang/Object;)Lcom/google/common/base/Optional;
move-result-object v0
return-object v0
.line 9
:cond_3
invoke-static {v3, v4}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
move-result-object v0
invoke-static {v0}, Lcom/google/common/base/Optional;->of(Ljava/lang/Object;)Lcom/google/common/base/Optional;
move-result-object v0
return-object v0
.end method
.method public toString()Ljava/lang/String;
.locals 4
.line 1
iget-object v0, p0, Lcom/google/common/io/ByteSource$ConcatenatedByteSource;->sources:Ljava/lang/Iterable;
invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/String;->length()I
move-result v1
add-int/lit8 v1, v1, 0x13
const-string v2, "ByteSource.concat("
const-string v3, ")"
invoke-static {v1, v2, v0, v3}, Lcom/google/android/gms/ads/internal/a;->a(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
return-object v0
.end method
@@ -0,0 +1,79 @@
.class final Lcom/google/common/io/ByteSource$EmptyByteSource;
.super Lcom/google/common/io/ByteSource$ByteArrayByteSource;
.source "ByteSource.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/google/common/io/ByteSource;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = "EmptyByteSource"
.end annotation
# static fields
.field public static final INSTANCE:Lcom/google/common/io/ByteSource$EmptyByteSource;
# direct methods
.method public static constructor <clinit>()V
.locals 1
.line 1
new-instance v0, Lcom/google/common/io/ByteSource$EmptyByteSource;
invoke-direct {v0}, Lcom/google/common/io/ByteSource$EmptyByteSource;-><init>()V
sput-object v0, Lcom/google/common/io/ByteSource$EmptyByteSource;->INSTANCE:Lcom/google/common/io/ByteSource$EmptyByteSource;
return-void
.end method
.method public constructor <init>()V
.locals 1
const/4 v0, 0x0
new-array v0, v0, [B
.line 1
invoke-direct {p0, v0}, Lcom/google/common/io/ByteSource$ByteArrayByteSource;-><init>([B)V
return-void
.end method
# virtual methods
.method public asCharSource(Ljava/nio/charset/Charset;)Lcom/google/common/io/CharSource;
.locals 0
.line 1
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
.line 2
invoke-static {}, Lcom/google/common/io/CharSource;->empty()Lcom/google/common/io/CharSource;
move-result-object p1
return-object p1
.end method
.method public read()[B
.locals 1
.line 1
iget-object v0, p0, Lcom/google/common/io/ByteSource$ByteArrayByteSource;->bytes:[B
return-object v0
.end method
.method public toString()Ljava/lang/String;
.locals 1
const-string v0, "ByteSource.empty()"
return-object v0
.end method
@@ -0,0 +1,447 @@
.class final Lcom/google/common/io/ByteSource$SlicedByteSource;
.super Lcom/google/common/io/ByteSource;
.source "ByteSource.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/google/common/io/ByteSource;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x11
name = "SlicedByteSource"
.end annotation
# instance fields
.field public final length:J
.field public final offset:J
.field public final synthetic this$0:Lcom/google/common/io/ByteSource;
# direct methods
.method public constructor <init>(Lcom/google/common/io/ByteSource;JJ)V
.locals 5
.line 1
iput-object p1, p0, Lcom/google/common/io/ByteSource$SlicedByteSource;->this$0:Lcom/google/common/io/ByteSource;
invoke-direct {p0}, Lcom/google/common/io/ByteSource;-><init>()V
const-wide/16 v0, 0x0
cmp-long p1, p2, v0
const/4 v2, 0x1
const/4 v3, 0x0
if-ltz p1, :cond_0
move p1, v2
goto :goto_0
:cond_0
move p1, v3
:goto_0
const-string v4, "offset (%s) may not be negative"
.line 2
invoke-static {p1, v4, p2, p3}, Lcom/google/common/base/Preconditions;->checkArgument(ZLjava/lang/String;J)V
cmp-long p1, p4, v0
if-ltz p1, :cond_1
goto :goto_1
:cond_1
move v2, v3
:goto_1
const-string p1, "length (%s) may not be negative"
.line 3
invoke-static {v2, p1, p4, p5}, Lcom/google/common/base/Preconditions;->checkArgument(ZLjava/lang/String;J)V
.line 4
iput-wide p2, p0, Lcom/google/common/io/ByteSource$SlicedByteSource;->offset:J
.line 5
iput-wide p4, p0, Lcom/google/common/io/ByteSource$SlicedByteSource;->length:J
return-void
.end method
.method private sliceStream(Ljava/io/InputStream;)Ljava/io/InputStream;
.locals 4
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
iget-wide v0, p0, Lcom/google/common/io/ByteSource$SlicedByteSource;->offset:J
const-wide/16 v2, 0x0
cmp-long v2, v0, v2
if-lez v2, :cond_0
.line 2
:try_start_0
invoke-static {p1, v0, v1}, Lcom/google/common/io/ByteStreams;->skipUpTo(Ljava/io/InputStream;J)J
move-result-wide v0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 3
iget-wide v2, p0, Lcom/google/common/io/ByteSource$SlicedByteSource;->offset:J
cmp-long v0, v0, v2
if-gez v0, :cond_0
.line 4
invoke-virtual {p1}, Ljava/io/InputStream;->close()V
.line 5
new-instance p1, Ljava/io/ByteArrayInputStream;
const/4 v0, 0x0
new-array v0, v0, [B
invoke-direct {p1, v0}, Ljava/io/ByteArrayInputStream;-><init>([B)V
return-object p1
:catchall_0
move-exception v0
.line 6
invoke-static {}, Lcom/google/common/io/Closer;->create()Lcom/google/common/io/Closer;
move-result-object v1
.line 7
invoke-virtual {v1, p1}, Lcom/google/common/io/Closer;->register(Ljava/io/Closeable;)Ljava/io/Closeable;
.line 8
:try_start_1
invoke-virtual {v1, v0}, Lcom/google/common/io/Closer;->rethrow(Ljava/lang/Throwable;)Ljava/lang/RuntimeException;
move-result-object p1
throw p1
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_1
:catchall_1
move-exception p1
.line 9
invoke-virtual {v1}, Lcom/google/common/io/Closer;->close()V
.line 10
throw p1
.line 11
:cond_0
iget-wide v0, p0, Lcom/google/common/io/ByteSource$SlicedByteSource;->length:J
invoke-static {p1, v0, v1}, Lcom/google/common/io/ByteStreams;->limit(Ljava/io/InputStream;J)Ljava/io/InputStream;
move-result-object p1
return-object p1
.end method
# virtual methods
.method public isEmpty()Z
.locals 4
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
iget-wide v0, p0, Lcom/google/common/io/ByteSource$SlicedByteSource;->length:J
const-wide/16 v2, 0x0
cmp-long v0, v0, v2
if-eqz v0, :cond_1
invoke-super {p0}, Lcom/google/common/io/ByteSource;->isEmpty()Z
move-result v0
if-eqz v0, :cond_0
goto :goto_0
:cond_0
const/4 v0, 0x0
goto :goto_1
:cond_1
:goto_0
const/4 v0, 0x1
:goto_1
return v0
.end method
.method public openBufferedStream()Ljava/io/InputStream;
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
iget-object v0, p0, Lcom/google/common/io/ByteSource$SlicedByteSource;->this$0:Lcom/google/common/io/ByteSource;
invoke-virtual {v0}, Lcom/google/common/io/ByteSource;->openBufferedStream()Ljava/io/InputStream;
move-result-object v0
invoke-direct {p0, v0}, Lcom/google/common/io/ByteSource$SlicedByteSource;->sliceStream(Ljava/io/InputStream;)Ljava/io/InputStream;
move-result-object v0
return-object v0
.end method
.method public openStream()Ljava/io/InputStream;
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
iget-object v0, p0, Lcom/google/common/io/ByteSource$SlicedByteSource;->this$0:Lcom/google/common/io/ByteSource;
invoke-virtual {v0}, Lcom/google/common/io/ByteSource;->openStream()Ljava/io/InputStream;
move-result-object v0
invoke-direct {p0, v0}, Lcom/google/common/io/ByteSource$SlicedByteSource;->sliceStream(Ljava/io/InputStream;)Ljava/io/InputStream;
move-result-object v0
return-object v0
.end method
.method public sizeIfKnown()Lcom/google/common/base/Optional;
.locals 6
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Lcom/google/common/base/Optional<",
"Ljava/lang/Long;",
">;"
}
.end annotation
.line 1
iget-object v0, p0, Lcom/google/common/io/ByteSource$SlicedByteSource;->this$0:Lcom/google/common/io/ByteSource;
invoke-virtual {v0}, Lcom/google/common/io/ByteSource;->sizeIfKnown()Lcom/google/common/base/Optional;
move-result-object v0
.line 2
invoke-virtual {v0}, Lcom/google/common/base/Optional;->isPresent()Z
move-result v1
if-eqz v1, :cond_0
.line 3
invoke-virtual {v0}, Lcom/google/common/base/Optional;->get()Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/lang/Long;
invoke-virtual {v0}, Ljava/lang/Long;->longValue()J
move-result-wide v0
.line 4
iget-wide v2, p0, Lcom/google/common/io/ByteSource$SlicedByteSource;->offset:J
invoke-static {v2, v3, v0, v1}, Ljava/lang/Math;->min(JJ)J
move-result-wide v2
.line 5
iget-wide v4, p0, Lcom/google/common/io/ByteSource$SlicedByteSource;->length:J
sub-long/2addr v0, v2
invoke-static {v4, v5, v0, v1}, Ljava/lang/Math;->min(JJ)J
move-result-wide v0
invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
move-result-object v0
invoke-static {v0}, Lcom/google/common/base/Optional;->of(Ljava/lang/Object;)Lcom/google/common/base/Optional;
move-result-object v0
return-object v0
.line 6
:cond_0
invoke-static {}, Lcom/google/common/base/Optional;->absent()Lcom/google/common/base/Optional;
move-result-object v0
return-object v0
.end method
.method public slice(JJ)Lcom/google/common/io/ByteSource;
.locals 6
const-wide/16 v0, 0x0
cmp-long v2, p1, v0
const/4 v3, 0x1
const/4 v4, 0x0
if-ltz v2, :cond_0
move v2, v3
goto :goto_0
:cond_0
move v2, v4
:goto_0
const-string v5, "offset (%s) may not be negative"
.line 1
invoke-static {v2, v5, p1, p2}, Lcom/google/common/base/Preconditions;->checkArgument(ZLjava/lang/String;J)V
cmp-long v2, p3, v0
if-ltz v2, :cond_1
goto :goto_1
:cond_1
move v3, v4
:goto_1
const-string v2, "length (%s) may not be negative"
.line 2
invoke-static {v3, v2, p3, p4}, Lcom/google/common/base/Preconditions;->checkArgument(ZLjava/lang/String;J)V
.line 3
iget-wide v2, p0, Lcom/google/common/io/ByteSource$SlicedByteSource;->length:J
sub-long/2addr v2, p1
cmp-long v0, v2, v0
if-gtz v0, :cond_2
.line 4
invoke-static {}, Lcom/google/common/io/ByteSource;->empty()Lcom/google/common/io/ByteSource;
move-result-object p1
goto :goto_2
.line 5
:cond_2
iget-object v0, p0, Lcom/google/common/io/ByteSource$SlicedByteSource;->this$0:Lcom/google/common/io/ByteSource;
iget-wide v4, p0, Lcom/google/common/io/ByteSource$SlicedByteSource;->offset:J
add-long/2addr v4, p1
invoke-static {p3, p4, v2, v3}, Ljava/lang/Math;->min(JJ)J
move-result-wide p1
invoke-virtual {v0, v4, v5, p1, p2}, Lcom/google/common/io/ByteSource;->slice(JJ)Lcom/google/common/io/ByteSource;
move-result-object p1
:goto_2
return-object p1
.end method
.method public toString()Ljava/lang/String;
.locals 7
.line 1
iget-object v0, p0, Lcom/google/common/io/ByteSource$SlicedByteSource;->this$0:Lcom/google/common/io/ByteSource;
invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object v0
iget-wide v1, p0, Lcom/google/common/io/ByteSource$SlicedByteSource;->offset:J
iget-wide v3, p0, Lcom/google/common/io/ByteSource$SlicedByteSource;->length:J
const/16 v5, 0x32
invoke-static {v0, v5}, Lcom/android/billingclient/api/d;->a(Ljava/lang/String;I)I
move-result v5
new-instance v6, Ljava/lang/StringBuilder;
invoke-direct {v6, v5}, Ljava/lang/StringBuilder;-><init>(I)V
invoke-virtual {v6, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string v0, ".slice("
invoke-virtual {v6, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v6, v1, v2}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
const-string v0, ", "
invoke-virtual {v6, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v6, v3, v4}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
const-string v0, ")"
invoke-virtual {v6, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
return-object v0
.end method
@@ -0,0 +1,944 @@
.class public abstract Lcom/google/common/io/ByteSource;
.super Ljava/lang/Object;
.source "ByteSource.java"
# annotations
.annotation build Lcom/google/common/annotations/GwtIncompatible;
.end annotation
.annotation runtime Lcom/google/common/io/ElementTypesAreNonnullByDefault;
.end annotation
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/google/common/io/ByteSource$ConcatenatedByteSource;,
Lcom/google/common/io/ByteSource$EmptyByteSource;,
Lcom/google/common/io/ByteSource$ByteArrayByteSource;,
Lcom/google/common/io/ByteSource$SlicedByteSource;,
Lcom/google/common/io/ByteSource$AsCharSource;
}
.end annotation
# direct methods
.method public constructor <init>()V
.locals 0
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static concat(Ljava/lang/Iterable;)Lcom/google/common/io/ByteSource;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/Iterable<",
"+",
"Lcom/google/common/io/ByteSource;",
">;)",
"Lcom/google/common/io/ByteSource;"
}
.end annotation
.line 1
new-instance v0, Lcom/google/common/io/ByteSource$ConcatenatedByteSource;
invoke-direct {v0, p0}, Lcom/google/common/io/ByteSource$ConcatenatedByteSource;-><init>(Ljava/lang/Iterable;)V
return-object v0
.end method
.method public static concat(Ljava/util/Iterator;)Lcom/google/common/io/ByteSource;
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/Iterator<",
"+",
"Lcom/google/common/io/ByteSource;",
">;)",
"Lcom/google/common/io/ByteSource;"
}
.end annotation
.line 2
invoke-static {p0}, Lcom/google/common/collect/ImmutableList;->copyOf(Ljava/util/Iterator;)Lcom/google/common/collect/ImmutableList;
move-result-object p0
invoke-static {p0}, Lcom/google/common/io/ByteSource;->concat(Ljava/lang/Iterable;)Lcom/google/common/io/ByteSource;
move-result-object p0
return-object p0
.end method
.method public static varargs concat([Lcom/google/common/io/ByteSource;)Lcom/google/common/io/ByteSource;
.locals 0
.line 3
invoke-static {p0}, Lcom/google/common/collect/ImmutableList;->copyOf([Ljava/lang/Object;)Lcom/google/common/collect/ImmutableList;
move-result-object p0
invoke-static {p0}, Lcom/google/common/io/ByteSource;->concat(Ljava/lang/Iterable;)Lcom/google/common/io/ByteSource;
move-result-object p0
return-object p0
.end method
.method private countBySkipping(Ljava/io/InputStream;)J
.locals 7
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
const-wide/16 v0, 0x0
move-wide v2, v0
:goto_0
const-wide/32 v4, 0x7fffffff
.line 1
invoke-static {p1, v4, v5}, Lcom/google/common/io/ByteStreams;->skipUpTo(Ljava/io/InputStream;J)J
move-result-wide v4
cmp-long v6, v4, v0
if-lez v6, :cond_0
add-long/2addr v2, v4
goto :goto_0
:cond_0
return-wide v2
.end method
.method public static empty()Lcom/google/common/io/ByteSource;
.locals 1
.line 1
sget-object v0, Lcom/google/common/io/ByteSource$EmptyByteSource;->INSTANCE:Lcom/google/common/io/ByteSource$EmptyByteSource;
return-object v0
.end method
.method public static wrap([B)Lcom/google/common/io/ByteSource;
.locals 1
.line 1
new-instance v0, Lcom/google/common/io/ByteSource$ByteArrayByteSource;
invoke-direct {v0, p0}, Lcom/google/common/io/ByteSource$ByteArrayByteSource;-><init>([B)V
return-object v0
.end method
# virtual methods
.method public asCharSource(Ljava/nio/charset/Charset;)Lcom/google/common/io/CharSource;
.locals 1
.line 1
new-instance v0, Lcom/google/common/io/ByteSource$AsCharSource;
invoke-direct {v0, p0, p1}, Lcom/google/common/io/ByteSource$AsCharSource;-><init>(Lcom/google/common/io/ByteSource;Ljava/nio/charset/Charset;)V
return-object v0
.end method
.method public contentEquals(Lcom/google/common/io/ByteSource;)Z
.locals 7
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
.line 2
invoke-static {}, Lcom/google/common/io/ByteStreams;->createBuffer()[B
move-result-object v0
.line 3
invoke-static {}, Lcom/google/common/io/ByteStreams;->createBuffer()[B
move-result-object v1
.line 4
invoke-static {}, Lcom/google/common/io/Closer;->create()Lcom/google/common/io/Closer;
move-result-object v2
.line 5
:try_start_0
invoke-virtual {p0}, Lcom/google/common/io/ByteSource;->openStream()Ljava/io/InputStream;
move-result-object v3
invoke-virtual {v2, v3}, Lcom/google/common/io/Closer;->register(Ljava/io/Closeable;)Ljava/io/Closeable;
move-result-object v3
check-cast v3, Ljava/io/InputStream;
.line 6
invoke-virtual {p1}, Lcom/google/common/io/ByteSource;->openStream()Ljava/io/InputStream;
move-result-object p1
invoke-virtual {v2, p1}, Lcom/google/common/io/Closer;->register(Ljava/io/Closeable;)Ljava/io/Closeable;
move-result-object p1
check-cast p1, Ljava/io/InputStream;
.line 7
:cond_0
array-length v4, v0
const/4 v5, 0x0
invoke-static {v3, v0, v5, v4}, Lcom/google/common/io/ByteStreams;->read(Ljava/io/InputStream;[BII)I
move-result v4
.line 8
array-length v6, v1
invoke-static {p1, v1, v5, v6}, Lcom/google/common/io/ByteStreams;->read(Ljava/io/InputStream;[BII)I
move-result v6
if-ne v4, v6, :cond_2
.line 9
invoke-static {v0, v1}, Ljava/util/Arrays;->equals([B[B)Z
move-result v6
if-nez v6, :cond_1
goto :goto_0
.line 10
:cond_1
array-length v5, v0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
if-eq v4, v5, :cond_0
const/4 p1, 0x1
.line 11
invoke-virtual {v2}, Lcom/google/common/io/Closer;->close()V
return p1
:cond_2
:goto_0
invoke-virtual {v2}, Lcom/google/common/io/Closer;->close()V
return v5
:catchall_0
move-exception p1
.line 12
:try_start_1
invoke-virtual {v2, p1}, Lcom/google/common/io/Closer;->rethrow(Ljava/lang/Throwable;)Ljava/lang/RuntimeException;
move-result-object p1
throw p1
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_1
:catchall_1
move-exception p1
.line 13
invoke-virtual {v2}, Lcom/google/common/io/Closer;->close()V
.line 14
throw p1
.end method
.method public copyTo(Lcom/google/common/io/ByteSink;)J
.locals 3
.annotation build Lcom/google/errorprone/annotations/CanIgnoreReturnValue;
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 9
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
.line 10
invoke-static {}, Lcom/google/common/io/Closer;->create()Lcom/google/common/io/Closer;
move-result-object v0
.line 11
:try_start_0
invoke-virtual {p0}, Lcom/google/common/io/ByteSource;->openStream()Ljava/io/InputStream;
move-result-object v1
invoke-virtual {v0, v1}, Lcom/google/common/io/Closer;->register(Ljava/io/Closeable;)Ljava/io/Closeable;
move-result-object v1
check-cast v1, Ljava/io/InputStream;
.line 12
invoke-virtual {p1}, Lcom/google/common/io/ByteSink;->openStream()Ljava/io/OutputStream;
move-result-object p1
invoke-virtual {v0, p1}, Lcom/google/common/io/Closer;->register(Ljava/io/Closeable;)Ljava/io/Closeable;
move-result-object p1
check-cast p1, Ljava/io/OutputStream;
.line 13
invoke-static {v1, p1}, Lcom/google/common/io/ByteStreams;->copy(Ljava/io/InputStream;Ljava/io/OutputStream;)J
move-result-wide v1
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 14
invoke-virtual {v0}, Lcom/google/common/io/Closer;->close()V
return-wide v1
:catchall_0
move-exception p1
.line 15
:try_start_1
invoke-virtual {v0, p1}, Lcom/google/common/io/Closer;->rethrow(Ljava/lang/Throwable;)Ljava/lang/RuntimeException;
move-result-object p1
throw p1
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_1
:catchall_1
move-exception p1
.line 16
invoke-virtual {v0}, Lcom/google/common/io/Closer;->close()V
.line 17
throw p1
.end method
.method public copyTo(Ljava/io/OutputStream;)J
.locals 3
.annotation build Lcom/google/errorprone/annotations/CanIgnoreReturnValue;
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
.line 2
invoke-static {}, Lcom/google/common/io/Closer;->create()Lcom/google/common/io/Closer;
move-result-object v0
.line 3
:try_start_0
invoke-virtual {p0}, Lcom/google/common/io/ByteSource;->openStream()Ljava/io/InputStream;
move-result-object v1
invoke-virtual {v0, v1}, Lcom/google/common/io/Closer;->register(Ljava/io/Closeable;)Ljava/io/Closeable;
move-result-object v1
check-cast v1, Ljava/io/InputStream;
.line 4
invoke-static {v1, p1}, Lcom/google/common/io/ByteStreams;->copy(Ljava/io/InputStream;Ljava/io/OutputStream;)J
move-result-wide v1
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 5
invoke-virtual {v0}, Lcom/google/common/io/Closer;->close()V
return-wide v1
:catchall_0
move-exception p1
.line 6
:try_start_1
invoke-virtual {v0, p1}, Lcom/google/common/io/Closer;->rethrow(Ljava/lang/Throwable;)Ljava/lang/RuntimeException;
move-result-object p1
throw p1
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_1
:catchall_1
move-exception p1
.line 7
invoke-virtual {v0}, Lcom/google/common/io/Closer;->close()V
.line 8
throw p1
.end method
.method public hash(Lcom/google/common/hash/HashFunction;)Lcom/google/common/hash/HashCode;
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
invoke-interface {p1}, Lcom/google/common/hash/HashFunction;->newHasher()Lcom/google/common/hash/Hasher;
move-result-object p1
.line 2
invoke-static {p1}, Lcom/google/common/hash/Funnels;->asOutputStream(Lcom/google/common/hash/PrimitiveSink;)Ljava/io/OutputStream;
move-result-object v0
invoke-virtual {p0, v0}, Lcom/google/common/io/ByteSource;->copyTo(Ljava/io/OutputStream;)J
.line 3
invoke-interface {p1}, Lcom/google/common/hash/Hasher;->hash()Lcom/google/common/hash/HashCode;
move-result-object p1
return-object p1
.end method
.method public isEmpty()Z
.locals 6
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
invoke-virtual {p0}, Lcom/google/common/io/ByteSource;->sizeIfKnown()Lcom/google/common/base/Optional;
move-result-object v0
.line 2
invoke-virtual {v0}, Lcom/google/common/base/Optional;->isPresent()Z
move-result v1
const/4 v2, 0x1
const/4 v3, 0x0
if-eqz v1, :cond_1
.line 3
invoke-virtual {v0}, Lcom/google/common/base/Optional;->get()Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/lang/Long;
invoke-virtual {v0}, Ljava/lang/Long;->longValue()J
move-result-wide v0
const-wide/16 v4, 0x0
cmp-long v0, v0, v4
if-nez v0, :cond_0
goto :goto_0
:cond_0
move v2, v3
:goto_0
return v2
.line 4
:cond_1
invoke-static {}, Lcom/google/common/io/Closer;->create()Lcom/google/common/io/Closer;
move-result-object v0
.line 5
:try_start_0
invoke-virtual {p0}, Lcom/google/common/io/ByteSource;->openStream()Ljava/io/InputStream;
move-result-object v1
invoke-virtual {v0, v1}, Lcom/google/common/io/Closer;->register(Ljava/io/Closeable;)Ljava/io/Closeable;
move-result-object v1
check-cast v1, Ljava/io/InputStream;
.line 6
invoke-virtual {v1}, Ljava/io/InputStream;->read()I
move-result v1
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
const/4 v4, -0x1
if-ne v1, v4, :cond_2
goto :goto_1
:cond_2
move v2, v3
.line 7
:goto_1
invoke-virtual {v0}, Lcom/google/common/io/Closer;->close()V
return v2
:catchall_0
move-exception v1
.line 8
:try_start_1
invoke-virtual {v0, v1}, Lcom/google/common/io/Closer;->rethrow(Ljava/lang/Throwable;)Ljava/lang/RuntimeException;
move-result-object v1
throw v1
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_1
:catchall_1
move-exception v1
.line 9
invoke-virtual {v0}, Lcom/google/common/io/Closer;->close()V
.line 10
throw v1
.end method
.method public openBufferedStream()Ljava/io/InputStream;
.locals 2
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
invoke-virtual {p0}, Lcom/google/common/io/ByteSource;->openStream()Ljava/io/InputStream;
move-result-object v0
.line 2
instance-of v1, v0, Ljava/io/BufferedInputStream;
if-eqz v1, :cond_0
.line 3
check-cast v0, Ljava/io/BufferedInputStream;
goto :goto_0
.line 4
:cond_0
new-instance v1, Ljava/io/BufferedInputStream;
invoke-direct {v1, v0}, Ljava/io/BufferedInputStream;-><init>(Ljava/io/InputStream;)V
move-object v0, v1
:goto_0
return-object v0
.end method
.method public abstract openStream()Ljava/io/InputStream;
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.end method
.method public read(Lcom/google/common/io/ByteProcessor;)Ljava/lang/Object;
.locals 2
.annotation build Lcom/google/common/annotations/Beta;
.end annotation
.annotation build Lcom/google/errorprone/annotations/CanIgnoreReturnValue;
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">(",
"Lcom/google/common/io/ByteProcessor<",
"TT;>;)TT;"
}
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 11
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
.line 12
invoke-static {}, Lcom/google/common/io/Closer;->create()Lcom/google/common/io/Closer;
move-result-object v0
.line 13
:try_start_0
invoke-virtual {p0}, Lcom/google/common/io/ByteSource;->openStream()Ljava/io/InputStream;
move-result-object v1
invoke-virtual {v0, v1}, Lcom/google/common/io/Closer;->register(Ljava/io/Closeable;)Ljava/io/Closeable;
move-result-object v1
check-cast v1, Ljava/io/InputStream;
.line 14
invoke-static {v1, p1}, Lcom/google/common/io/ByteStreams;->readBytes(Ljava/io/InputStream;Lcom/google/common/io/ByteProcessor;)Ljava/lang/Object;
move-result-object p1
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 15
invoke-virtual {v0}, Lcom/google/common/io/Closer;->close()V
return-object p1
:catchall_0
move-exception p1
.line 16
:try_start_1
invoke-virtual {v0, p1}, Lcom/google/common/io/Closer;->rethrow(Ljava/lang/Throwable;)Ljava/lang/RuntimeException;
move-result-object p1
throw p1
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_1
:catchall_1
move-exception p1
.line 17
invoke-virtual {v0}, Lcom/google/common/io/Closer;->close()V
.line 18
throw p1
.end method
.method public read()[B
.locals 4
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
invoke-static {}, Lcom/google/common/io/Closer;->create()Lcom/google/common/io/Closer;
move-result-object v0
.line 2
:try_start_0
invoke-virtual {p0}, Lcom/google/common/io/ByteSource;->openStream()Ljava/io/InputStream;
move-result-object v1
invoke-virtual {v0, v1}, Lcom/google/common/io/Closer;->register(Ljava/io/Closeable;)Ljava/io/Closeable;
move-result-object v1
check-cast v1, Ljava/io/InputStream;
.line 3
invoke-virtual {p0}, Lcom/google/common/io/ByteSource;->sizeIfKnown()Lcom/google/common/base/Optional;
move-result-object v2
.line 4
invoke-virtual {v2}, Lcom/google/common/base/Optional;->isPresent()Z
move-result v3
if-eqz v3, :cond_0
.line 5
invoke-virtual {v2}, Lcom/google/common/base/Optional;->get()Ljava/lang/Object;
move-result-object v2
check-cast v2, Ljava/lang/Long;
invoke-virtual {v2}, Ljava/lang/Long;->longValue()J
move-result-wide v2
invoke-static {v1, v2, v3}, Lcom/google/common/io/ByteStreams;->toByteArray(Ljava/io/InputStream;J)[B
move-result-object v1
goto :goto_0
.line 6
:cond_0
invoke-static {v1}, Lcom/google/common/io/ByteStreams;->toByteArray(Ljava/io/InputStream;)[B
move-result-object v1
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 7
:goto_0
invoke-virtual {v0}, Lcom/google/common/io/Closer;->close()V
return-object v1
:catchall_0
move-exception v1
.line 8
:try_start_1
invoke-virtual {v0, v1}, Lcom/google/common/io/Closer;->rethrow(Ljava/lang/Throwable;)Ljava/lang/RuntimeException;
move-result-object v1
throw v1
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_1
:catchall_1
move-exception v1
.line 9
invoke-virtual {v0}, Lcom/google/common/io/Closer;->close()V
.line 10
throw v1
.end method
.method public size()J
.locals 3
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
invoke-virtual {p0}, Lcom/google/common/io/ByteSource;->sizeIfKnown()Lcom/google/common/base/Optional;
move-result-object v0
.line 2
invoke-virtual {v0}, Lcom/google/common/base/Optional;->isPresent()Z
move-result v1
if-eqz v1, :cond_0
.line 3
invoke-virtual {v0}, Lcom/google/common/base/Optional;->get()Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/lang/Long;
invoke-virtual {v0}, Ljava/lang/Long;->longValue()J
move-result-wide v0
return-wide v0
.line 4
:cond_0
invoke-static {}, Lcom/google/common/io/Closer;->create()Lcom/google/common/io/Closer;
move-result-object v0
.line 5
:try_start_0
invoke-virtual {p0}, Lcom/google/common/io/ByteSource;->openStream()Ljava/io/InputStream;
move-result-object v1
invoke-virtual {v0, v1}, Lcom/google/common/io/Closer;->register(Ljava/io/Closeable;)Ljava/io/Closeable;
move-result-object v1
check-cast v1, Ljava/io/InputStream;
.line 6
invoke-direct {p0, v1}, Lcom/google/common/io/ByteSource;->countBySkipping(Ljava/io/InputStream;)J
move-result-wide v1
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 7
invoke-virtual {v0}, Lcom/google/common/io/Closer;->close()V
return-wide v1
:catchall_0
move-exception v1
invoke-virtual {v0}, Lcom/google/common/io/Closer;->close()V
.line 8
throw v1
.line 9
:catch_0
invoke-virtual {v0}, Lcom/google/common/io/Closer;->close()V
.line 10
invoke-static {}, Lcom/google/common/io/Closer;->create()Lcom/google/common/io/Closer;
move-result-object v0
.line 11
:try_start_1
invoke-virtual {p0}, Lcom/google/common/io/ByteSource;->openStream()Ljava/io/InputStream;
move-result-object v1
invoke-virtual {v0, v1}, Lcom/google/common/io/Closer;->register(Ljava/io/Closeable;)Ljava/io/Closeable;
move-result-object v1
check-cast v1, Ljava/io/InputStream;
.line 12
invoke-static {v1}, Lcom/google/common/io/ByteStreams;->exhaust(Ljava/io/InputStream;)J
move-result-wide v1
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_1
.line 13
invoke-virtual {v0}, Lcom/google/common/io/Closer;->close()V
return-wide v1
:catchall_1
move-exception v1
.line 14
:try_start_2
invoke-virtual {v0, v1}, Lcom/google/common/io/Closer;->rethrow(Ljava/lang/Throwable;)Ljava/lang/RuntimeException;
move-result-object v1
throw v1
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_2
:catchall_2
move-exception v1
.line 15
invoke-virtual {v0}, Lcom/google/common/io/Closer;->close()V
.line 16
throw v1
.end method
.method public sizeIfKnown()Lcom/google/common/base/Optional;
.locals 1
.annotation build Lcom/google/common/annotations/Beta;
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Lcom/google/common/base/Optional<",
"Ljava/lang/Long;",
">;"
}
.end annotation
.line 1
invoke-static {}, Lcom/google/common/base/Optional;->absent()Lcom/google/common/base/Optional;
move-result-object v0
return-object v0
.end method
.method public slice(JJ)Lcom/google/common/io/ByteSource;
.locals 7
.line 1
new-instance v6, Lcom/google/common/io/ByteSource$SlicedByteSource;
move-object v0, v6
move-object v1, p0
move-wide v2, p1
move-wide v4, p3
invoke-direct/range {v0 .. v5}, Lcom/google/common/io/ByteSource$SlicedByteSource;-><init>(Lcom/google/common/io/ByteSource;JJ)V
return-object v6
.end method
@@ -0,0 +1,59 @@
.class Lcom/google/common/io/ByteStreams$1;
.super Ljava/io/OutputStream;
.source "ByteStreams.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/google/common/io/ByteStreams;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1
name = null
.end annotation
# direct methods
.method public constructor <init>()V
.locals 0
.line 1
invoke-direct {p0}, Ljava/io/OutputStream;-><init>()V
return-void
.end method
# virtual methods
.method public toString()Ljava/lang/String;
.locals 1
const-string v0, "ByteStreams.nullOutputStream()"
return-object v0
.end method
.method public write(I)V
.locals 0
return-void
.end method
.method public write([B)V
.locals 0
.line 1
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
return-void
.end method
.method public write([BII)V
.locals 0
.line 2
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
return-void
.end method
@@ -0,0 +1,440 @@
.class Lcom/google/common/io/ByteStreams$ByteArrayDataInputStream;
.super Ljava/lang/Object;
.source "ByteStreams.java"
# interfaces
.implements Lcom/google/common/io/ByteArrayDataInput;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/google/common/io/ByteStreams;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x9
name = "ByteArrayDataInputStream"
.end annotation
# instance fields
.field public final input:Ljava/io/DataInput;
# direct methods
.method public constructor <init>(Ljava/io/ByteArrayInputStream;)V
.locals 1
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 2
new-instance v0, Ljava/io/DataInputStream;
invoke-direct {v0, p1}, Ljava/io/DataInputStream;-><init>(Ljava/io/InputStream;)V
iput-object v0, p0, Lcom/google/common/io/ByteStreams$ByteArrayDataInputStream;->input:Ljava/io/DataInput;
return-void
.end method
# virtual methods
.method public readBoolean()Z
.locals 2
.line 1
:try_start_0
iget-object v0, p0, Lcom/google/common/io/ByteStreams$ByteArrayDataInputStream;->input:Ljava/io/DataInput;
invoke-interface {v0}, Ljava/io/DataInput;->readBoolean()Z
move-result v0
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
return v0
:catch_0
move-exception v0
.line 2
new-instance v1, Ljava/lang/IllegalStateException;
invoke-direct {v1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/Throwable;)V
throw v1
.end method
.method public readByte()B
.locals 2
.line 1
:try_start_0
iget-object v0, p0, Lcom/google/common/io/ByteStreams$ByteArrayDataInputStream;->input:Ljava/io/DataInput;
invoke-interface {v0}, Ljava/io/DataInput;->readByte()B
move-result v0
:try_end_0
.catch Ljava/io/EOFException; {:try_start_0 .. :try_end_0} :catch_1
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
return v0
:catch_0
move-exception v0
.line 2
new-instance v1, Ljava/lang/AssertionError;
invoke-direct {v1, v0}, Ljava/lang/AssertionError;-><init>(Ljava/lang/Object;)V
throw v1
:catch_1
move-exception v0
.line 3
new-instance v1, Ljava/lang/IllegalStateException;
invoke-direct {v1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/Throwable;)V
throw v1
.end method
.method public readChar()C
.locals 2
.line 1
:try_start_0
iget-object v0, p0, Lcom/google/common/io/ByteStreams$ByteArrayDataInputStream;->input:Ljava/io/DataInput;
invoke-interface {v0}, Ljava/io/DataInput;->readChar()C
move-result v0
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
return v0
:catch_0
move-exception v0
.line 2
new-instance v1, Ljava/lang/IllegalStateException;
invoke-direct {v1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/Throwable;)V
throw v1
.end method
.method public readDouble()D
.locals 2
.line 1
:try_start_0
iget-object v0, p0, Lcom/google/common/io/ByteStreams$ByteArrayDataInputStream;->input:Ljava/io/DataInput;
invoke-interface {v0}, Ljava/io/DataInput;->readDouble()D
move-result-wide v0
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
return-wide v0
:catch_0
move-exception v0
.line 2
new-instance v1, Ljava/lang/IllegalStateException;
invoke-direct {v1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/Throwable;)V
throw v1
.end method
.method public readFloat()F
.locals 2
.line 1
:try_start_0
iget-object v0, p0, Lcom/google/common/io/ByteStreams$ByteArrayDataInputStream;->input:Ljava/io/DataInput;
invoke-interface {v0}, Ljava/io/DataInput;->readFloat()F
move-result v0
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
return v0
:catch_0
move-exception v0
.line 2
new-instance v1, Ljava/lang/IllegalStateException;
invoke-direct {v1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/Throwable;)V
throw v1
.end method
.method public readFully([B)V
.locals 1
.line 1
:try_start_0
iget-object v0, p0, Lcom/google/common/io/ByteStreams$ByteArrayDataInputStream;->input:Ljava/io/DataInput;
invoke-interface {v0, p1}, Ljava/io/DataInput;->readFully([B)V
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
return-void
:catch_0
move-exception p1
.line 2
new-instance v0, Ljava/lang/IllegalStateException;
invoke-direct {v0, p1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/Throwable;)V
throw v0
.end method
.method public readFully([BII)V
.locals 1
.line 3
:try_start_0
iget-object v0, p0, Lcom/google/common/io/ByteStreams$ByteArrayDataInputStream;->input:Ljava/io/DataInput;
invoke-interface {v0, p1, p2, p3}, Ljava/io/DataInput;->readFully([BII)V
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
return-void
:catch_0
move-exception p1
.line 4
new-instance p2, Ljava/lang/IllegalStateException;
invoke-direct {p2, p1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/Throwable;)V
throw p2
.end method
.method public readInt()I
.locals 2
.line 1
:try_start_0
iget-object v0, p0, Lcom/google/common/io/ByteStreams$ByteArrayDataInputStream;->input:Ljava/io/DataInput;
invoke-interface {v0}, Ljava/io/DataInput;->readInt()I
move-result v0
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
return v0
:catch_0
move-exception v0
.line 2
new-instance v1, Ljava/lang/IllegalStateException;
invoke-direct {v1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/Throwable;)V
throw v1
.end method
.method public readLine()Ljava/lang/String;
.locals 2
.annotation runtime Ljavax/annotation/CheckForNull;
.end annotation
.line 1
:try_start_0
iget-object v0, p0, Lcom/google/common/io/ByteStreams$ByteArrayDataInputStream;->input:Ljava/io/DataInput;
invoke-interface {v0}, Ljava/io/DataInput;->readLine()Ljava/lang/String;
move-result-object v0
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
return-object v0
:catch_0
move-exception v0
.line 2
new-instance v1, Ljava/lang/IllegalStateException;
invoke-direct {v1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/Throwable;)V
throw v1
.end method
.method public readLong()J
.locals 2
.line 1
:try_start_0
iget-object v0, p0, Lcom/google/common/io/ByteStreams$ByteArrayDataInputStream;->input:Ljava/io/DataInput;
invoke-interface {v0}, Ljava/io/DataInput;->readLong()J
move-result-wide v0
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
return-wide v0
:catch_0
move-exception v0
.line 2
new-instance v1, Ljava/lang/IllegalStateException;
invoke-direct {v1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/Throwable;)V
throw v1
.end method
.method public readShort()S
.locals 2
.line 1
:try_start_0
iget-object v0, p0, Lcom/google/common/io/ByteStreams$ByteArrayDataInputStream;->input:Ljava/io/DataInput;
invoke-interface {v0}, Ljava/io/DataInput;->readShort()S
move-result v0
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
return v0
:catch_0
move-exception v0
.line 2
new-instance v1, Ljava/lang/IllegalStateException;
invoke-direct {v1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/Throwable;)V
throw v1
.end method
.method public readUTF()Ljava/lang/String;
.locals 2
.line 1
:try_start_0
iget-object v0, p0, Lcom/google/common/io/ByteStreams$ByteArrayDataInputStream;->input:Ljava/io/DataInput;
invoke-interface {v0}, Ljava/io/DataInput;->readUTF()Ljava/lang/String;
move-result-object v0
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
return-object v0
:catch_0
move-exception v0
.line 2
new-instance v1, Ljava/lang/IllegalStateException;
invoke-direct {v1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/Throwable;)V
throw v1
.end method
.method public readUnsignedByte()I
.locals 2
.line 1
:try_start_0
iget-object v0, p0, Lcom/google/common/io/ByteStreams$ByteArrayDataInputStream;->input:Ljava/io/DataInput;
invoke-interface {v0}, Ljava/io/DataInput;->readUnsignedByte()I
move-result v0
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
return v0
:catch_0
move-exception v0
.line 2
new-instance v1, Ljava/lang/IllegalStateException;
invoke-direct {v1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/Throwable;)V
throw v1
.end method
.method public readUnsignedShort()I
.locals 2
.line 1
:try_start_0
iget-object v0, p0, Lcom/google/common/io/ByteStreams$ByteArrayDataInputStream;->input:Ljava/io/DataInput;
invoke-interface {v0}, Ljava/io/DataInput;->readUnsignedShort()I
move-result v0
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
return v0
:catch_0
move-exception v0
.line 2
new-instance v1, Ljava/lang/IllegalStateException;
invoke-direct {v1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/Throwable;)V
throw v1
.end method
.method public skipBytes(I)I
.locals 1
.line 1
:try_start_0
iget-object v0, p0, Lcom/google/common/io/ByteStreams$ByteArrayDataInputStream;->input:Ljava/io/DataInput;
invoke-interface {v0, p1}, Ljava/io/DataInput;->skipBytes(I)I
move-result p1
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
return p1
:catch_0
move-exception p1
.line 2
new-instance v0, Ljava/lang/IllegalStateException;
invoke-direct {v0, p1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/Throwable;)V
throw v0
.end method
@@ -0,0 +1,395 @@
.class Lcom/google/common/io/ByteStreams$ByteArrayDataOutputStream;
.super Ljava/lang/Object;
.source "ByteStreams.java"
# interfaces
.implements Lcom/google/common/io/ByteArrayDataOutput;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/google/common/io/ByteStreams;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x9
name = "ByteArrayDataOutputStream"
.end annotation
# instance fields
.field public final byteArrayOutputStream:Ljava/io/ByteArrayOutputStream;
.field public final output:Ljava/io/DataOutput;
# direct methods
.method public constructor <init>(Ljava/io/ByteArrayOutputStream;)V
.locals 1
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 2
iput-object p1, p0, Lcom/google/common/io/ByteStreams$ByteArrayDataOutputStream;->byteArrayOutputStream:Ljava/io/ByteArrayOutputStream;
.line 3
new-instance v0, Ljava/io/DataOutputStream;
invoke-direct {v0, p1}, Ljava/io/DataOutputStream;-><init>(Ljava/io/OutputStream;)V
iput-object v0, p0, Lcom/google/common/io/ByteStreams$ByteArrayDataOutputStream;->output:Ljava/io/DataOutput;
return-void
.end method
# virtual methods
.method public toByteArray()[B
.locals 1
.line 1
iget-object v0, p0, Lcom/google/common/io/ByteStreams$ByteArrayDataOutputStream;->byteArrayOutputStream:Ljava/io/ByteArrayOutputStream;
invoke-virtual {v0}, Ljava/io/ByteArrayOutputStream;->toByteArray()[B
move-result-object v0
return-object v0
.end method
.method public write(I)V
.locals 1
.line 1
:try_start_0
iget-object v0, p0, Lcom/google/common/io/ByteStreams$ByteArrayDataOutputStream;->output:Ljava/io/DataOutput;
invoke-interface {v0, p1}, Ljava/io/DataOutput;->write(I)V
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
return-void
:catch_0
move-exception p1
.line 2
new-instance v0, Ljava/lang/AssertionError;
invoke-direct {v0, p1}, Ljava/lang/AssertionError;-><init>(Ljava/lang/Object;)V
throw v0
.end method
.method public write([B)V
.locals 1
.line 3
:try_start_0
iget-object v0, p0, Lcom/google/common/io/ByteStreams$ByteArrayDataOutputStream;->output:Ljava/io/DataOutput;
invoke-interface {v0, p1}, Ljava/io/DataOutput;->write([B)V
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
return-void
:catch_0
move-exception p1
.line 4
new-instance v0, Ljava/lang/AssertionError;
invoke-direct {v0, p1}, Ljava/lang/AssertionError;-><init>(Ljava/lang/Object;)V
throw v0
.end method
.method public write([BII)V
.locals 1
.line 5
:try_start_0
iget-object v0, p0, Lcom/google/common/io/ByteStreams$ByteArrayDataOutputStream;->output:Ljava/io/DataOutput;
invoke-interface {v0, p1, p2, p3}, Ljava/io/DataOutput;->write([BII)V
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
return-void
:catch_0
move-exception p1
.line 6
new-instance p2, Ljava/lang/AssertionError;
invoke-direct {p2, p1}, Ljava/lang/AssertionError;-><init>(Ljava/lang/Object;)V
throw p2
.end method
.method public writeBoolean(Z)V
.locals 1
.line 1
:try_start_0
iget-object v0, p0, Lcom/google/common/io/ByteStreams$ByteArrayDataOutputStream;->output:Ljava/io/DataOutput;
invoke-interface {v0, p1}, Ljava/io/DataOutput;->writeBoolean(Z)V
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
return-void
:catch_0
move-exception p1
.line 2
new-instance v0, Ljava/lang/AssertionError;
invoke-direct {v0, p1}, Ljava/lang/AssertionError;-><init>(Ljava/lang/Object;)V
throw v0
.end method
.method public writeByte(I)V
.locals 1
.line 1
:try_start_0
iget-object v0, p0, Lcom/google/common/io/ByteStreams$ByteArrayDataOutputStream;->output:Ljava/io/DataOutput;
invoke-interface {v0, p1}, Ljava/io/DataOutput;->writeByte(I)V
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
return-void
:catch_0
move-exception p1
.line 2
new-instance v0, Ljava/lang/AssertionError;
invoke-direct {v0, p1}, Ljava/lang/AssertionError;-><init>(Ljava/lang/Object;)V
throw v0
.end method
.method public writeBytes(Ljava/lang/String;)V
.locals 1
.line 1
:try_start_0
iget-object v0, p0, Lcom/google/common/io/ByteStreams$ByteArrayDataOutputStream;->output:Ljava/io/DataOutput;
invoke-interface {v0, p1}, Ljava/io/DataOutput;->writeBytes(Ljava/lang/String;)V
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
return-void
:catch_0
move-exception p1
.line 2
new-instance v0, Ljava/lang/AssertionError;
invoke-direct {v0, p1}, Ljava/lang/AssertionError;-><init>(Ljava/lang/Object;)V
throw v0
.end method
.method public writeChar(I)V
.locals 1
.line 1
:try_start_0
iget-object v0, p0, Lcom/google/common/io/ByteStreams$ByteArrayDataOutputStream;->output:Ljava/io/DataOutput;
invoke-interface {v0, p1}, Ljava/io/DataOutput;->writeChar(I)V
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
return-void
:catch_0
move-exception p1
.line 2
new-instance v0, Ljava/lang/AssertionError;
invoke-direct {v0, p1}, Ljava/lang/AssertionError;-><init>(Ljava/lang/Object;)V
throw v0
.end method
.method public writeChars(Ljava/lang/String;)V
.locals 1
.line 1
:try_start_0
iget-object v0, p0, Lcom/google/common/io/ByteStreams$ByteArrayDataOutputStream;->output:Ljava/io/DataOutput;
invoke-interface {v0, p1}, Ljava/io/DataOutput;->writeChars(Ljava/lang/String;)V
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
return-void
:catch_0
move-exception p1
.line 2
new-instance v0, Ljava/lang/AssertionError;
invoke-direct {v0, p1}, Ljava/lang/AssertionError;-><init>(Ljava/lang/Object;)V
throw v0
.end method
.method public writeDouble(D)V
.locals 1
.line 1
:try_start_0
iget-object v0, p0, Lcom/google/common/io/ByteStreams$ByteArrayDataOutputStream;->output:Ljava/io/DataOutput;
invoke-interface {v0, p1, p2}, Ljava/io/DataOutput;->writeDouble(D)V
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
return-void
:catch_0
move-exception p1
.line 2
new-instance p2, Ljava/lang/AssertionError;
invoke-direct {p2, p1}, Ljava/lang/AssertionError;-><init>(Ljava/lang/Object;)V
throw p2
.end method
.method public writeFloat(F)V
.locals 1
.line 1
:try_start_0
iget-object v0, p0, Lcom/google/common/io/ByteStreams$ByteArrayDataOutputStream;->output:Ljava/io/DataOutput;
invoke-interface {v0, p1}, Ljava/io/DataOutput;->writeFloat(F)V
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
return-void
:catch_0
move-exception p1
.line 2
new-instance v0, Ljava/lang/AssertionError;
invoke-direct {v0, p1}, Ljava/lang/AssertionError;-><init>(Ljava/lang/Object;)V
throw v0
.end method
.method public writeInt(I)V
.locals 1
.line 1
:try_start_0
iget-object v0, p0, Lcom/google/common/io/ByteStreams$ByteArrayDataOutputStream;->output:Ljava/io/DataOutput;
invoke-interface {v0, p1}, Ljava/io/DataOutput;->writeInt(I)V
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
return-void
:catch_0
move-exception p1
.line 2
new-instance v0, Ljava/lang/AssertionError;
invoke-direct {v0, p1}, Ljava/lang/AssertionError;-><init>(Ljava/lang/Object;)V
throw v0
.end method
.method public writeLong(J)V
.locals 1
.line 1
:try_start_0
iget-object v0, p0, Lcom/google/common/io/ByteStreams$ByteArrayDataOutputStream;->output:Ljava/io/DataOutput;
invoke-interface {v0, p1, p2}, Ljava/io/DataOutput;->writeLong(J)V
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
return-void
:catch_0
move-exception p1
.line 2
new-instance p2, Ljava/lang/AssertionError;
invoke-direct {p2, p1}, Ljava/lang/AssertionError;-><init>(Ljava/lang/Object;)V
throw p2
.end method
.method public writeShort(I)V
.locals 1
.line 1
:try_start_0
iget-object v0, p0, Lcom/google/common/io/ByteStreams$ByteArrayDataOutputStream;->output:Ljava/io/DataOutput;
invoke-interface {v0, p1}, Ljava/io/DataOutput;->writeShort(I)V
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
return-void
:catch_0
move-exception p1
.line 2
new-instance v0, Ljava/lang/AssertionError;
invoke-direct {v0, p1}, Ljava/lang/AssertionError;-><init>(Ljava/lang/Object;)V
throw v0
.end method
.method public writeUTF(Ljava/lang/String;)V
.locals 1
.line 1
:try_start_0
iget-object v0, p0, Lcom/google/common/io/ByteStreams$ByteArrayDataOutputStream;->output:Ljava/io/DataOutput;
invoke-interface {v0, p1}, Ljava/io/DataOutput;->writeUTF(Ljava/lang/String;)V
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
return-void
:catch_0
move-exception p1
.line 2
new-instance v0, Ljava/lang/AssertionError;
invoke-direct {v0, p1}, Ljava/lang/AssertionError;-><init>(Ljava/lang/Object;)V
throw v0
.end method
@@ -0,0 +1,328 @@
.class final Lcom/google/common/io/ByteStreams$LimitedInputStream;
.super Ljava/io/FilterInputStream;
.source "ByteStreams.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/google/common/io/ByteStreams;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = "LimitedInputStream"
.end annotation
# instance fields
.field private left:J
.field private mark:J
# direct methods
.method public constructor <init>(Ljava/io/InputStream;J)V
.locals 2
.line 1
invoke-direct {p0, p1}, Ljava/io/FilterInputStream;-><init>(Ljava/io/InputStream;)V
const-wide/16 v0, -0x1
.line 2
iput-wide v0, p0, Lcom/google/common/io/ByteStreams$LimitedInputStream;->mark:J
.line 3
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
const-wide/16 v0, 0x0
cmp-long p1, p2, v0
if-ltz p1, :cond_0
const/4 p1, 0x1
goto :goto_0
:cond_0
const/4 p1, 0x0
:goto_0
const-string v0, "limit must be non-negative"
.line 4
invoke-static {p1, v0}, Lcom/google/common/base/Preconditions;->checkArgument(ZLjava/lang/Object;)V
.line 5
iput-wide p2, p0, Lcom/google/common/io/ByteStreams$LimitedInputStream;->left:J
return-void
.end method
# virtual methods
.method public available()I
.locals 4
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
iget-object v0, p0, Ljava/io/FilterInputStream;->in:Ljava/io/InputStream;
invoke-virtual {v0}, Ljava/io/InputStream;->available()I
move-result v0
int-to-long v0, v0
iget-wide v2, p0, Lcom/google/common/io/ByteStreams$LimitedInputStream;->left:J
invoke-static {v0, v1, v2, v3}, Ljava/lang/Math;->min(JJ)J
move-result-wide v0
long-to-int v0, v0
return v0
.end method
.method public declared-synchronized mark(I)V
.locals 2
monitor-enter p0
.line 1
:try_start_0
iget-object v0, p0, Ljava/io/FilterInputStream;->in:Ljava/io/InputStream;
invoke-virtual {v0, p1}, Ljava/io/InputStream;->mark(I)V
.line 2
iget-wide v0, p0, Lcom/google/common/io/ByteStreams$LimitedInputStream;->left:J
iput-wide v0, p0, Lcom/google/common/io/ByteStreams$LimitedInputStream;->mark:J
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 3
monitor-exit p0
return-void
:catchall_0
move-exception p1
monitor-exit p0
throw p1
.end method
.method public read()I
.locals 5
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
iget-wide v0, p0, Lcom/google/common/io/ByteStreams$LimitedInputStream;->left:J
const-wide/16 v2, 0x0
cmp-long v0, v0, v2
const/4 v1, -0x1
if-nez v0, :cond_0
return v1
.line 2
:cond_0
iget-object v0, p0, Ljava/io/FilterInputStream;->in:Ljava/io/InputStream;
invoke-virtual {v0}, Ljava/io/InputStream;->read()I
move-result v0
if-eq v0, v1, :cond_1
.line 3
iget-wide v1, p0, Lcom/google/common/io/ByteStreams$LimitedInputStream;->left:J
const-wide/16 v3, 0x1
sub-long/2addr v1, v3
iput-wide v1, p0, Lcom/google/common/io/ByteStreams$LimitedInputStream;->left:J
:cond_1
return v0
.end method
.method public read([BII)I
.locals 6
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 4
iget-wide v0, p0, Lcom/google/common/io/ByteStreams$LimitedInputStream;->left:J
const-wide/16 v2, 0x0
cmp-long v2, v0, v2
const/4 v3, -0x1
if-nez v2, :cond_0
return v3
:cond_0
int-to-long v4, p3
.line 5
invoke-static {v4, v5, v0, v1}, Ljava/lang/Math;->min(JJ)J
move-result-wide v0
long-to-int p3, v0
.line 6
iget-object v0, p0, Ljava/io/FilterInputStream;->in:Ljava/io/InputStream;
invoke-virtual {v0, p1, p2, p3}, Ljava/io/InputStream;->read([BII)I
move-result p1
if-eq p1, v3, :cond_1
.line 7
iget-wide p2, p0, Lcom/google/common/io/ByteStreams$LimitedInputStream;->left:J
int-to-long v0, p1
sub-long/2addr p2, v0
iput-wide p2, p0, Lcom/google/common/io/ByteStreams$LimitedInputStream;->left:J
:cond_1
return p1
.end method
.method public declared-synchronized reset()V
.locals 4
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
monitor-enter p0
.line 1
:try_start_0
iget-object v0, p0, Ljava/io/FilterInputStream;->in:Ljava/io/InputStream;
invoke-virtual {v0}, Ljava/io/InputStream;->markSupported()Z
move-result v0
if-eqz v0, :cond_1
.line 2
iget-wide v0, p0, Lcom/google/common/io/ByteStreams$LimitedInputStream;->mark:J
const-wide/16 v2, -0x1
cmp-long v0, v0, v2
if-eqz v0, :cond_0
.line 3
iget-object v0, p0, Ljava/io/FilterInputStream;->in:Ljava/io/InputStream;
invoke-virtual {v0}, Ljava/io/InputStream;->reset()V
.line 4
iget-wide v0, p0, Lcom/google/common/io/ByteStreams$LimitedInputStream;->mark:J
iput-wide v0, p0, Lcom/google/common/io/ByteStreams$LimitedInputStream;->left:J
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 5
monitor-exit p0
return-void
.line 6
:cond_0
:try_start_1
new-instance v0, Ljava/io/IOException;
const-string v1, "Mark not set"
invoke-direct {v0, v1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
throw v0
.line 7
:cond_1
new-instance v0, Ljava/io/IOException;
const-string v1, "Mark not supported"
invoke-direct {v0, v1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
throw v0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
:catchall_0
move-exception v0
monitor-exit p0
throw v0
.end method
.method public skip(J)J
.locals 2
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
iget-wide v0, p0, Lcom/google/common/io/ByteStreams$LimitedInputStream;->left:J
invoke-static {p1, p2, v0, v1}, Ljava/lang/Math;->min(JJ)J
move-result-wide p1
.line 2
iget-object v0, p0, Ljava/io/FilterInputStream;->in:Ljava/io/InputStream;
invoke-virtual {v0, p1, p2}, Ljava/io/InputStream;->skip(J)J
move-result-wide p1
.line 3
iget-wide v0, p0, Lcom/google/common/io/ByteStreams$LimitedInputStream;->left:J
sub-long/2addr v0, p1
iput-wide v0, p0, Lcom/google/common/io/ByteStreams$LimitedInputStream;->left:J
return-wide p1
.end method
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,582 @@
.class final Lcom/google/common/io/CharSequenceReader;
.super Ljava/io/Reader;
.source "CharSequenceReader.java"
# annotations
.annotation build Lcom/google/common/annotations/GwtIncompatible;
.end annotation
.annotation runtime Lcom/google/common/io/ElementTypesAreNonnullByDefault;
.end annotation
# instance fields
.field private mark:I
.field private pos:I
.field private seq:Ljava/lang/CharSequence;
.annotation runtime Ljavax/annotation/CheckForNull;
.end annotation
.end field
# direct methods
.method public constructor <init>(Ljava/lang/CharSequence;)V
.locals 0
.line 1
invoke-direct {p0}, Ljava/io/Reader;-><init>()V
.line 2
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p1
check-cast p1, Ljava/lang/CharSequence;
iput-object p1, p0, Lcom/google/common/io/CharSequenceReader;->seq:Ljava/lang/CharSequence;
return-void
.end method
.method private checkOpen()V
.locals 2
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
iget-object v0, p0, Lcom/google/common/io/CharSequenceReader;->seq:Ljava/lang/CharSequence;
if-eqz v0, :cond_0
return-void
.line 2
:cond_0
new-instance v0, Ljava/io/IOException;
const-string v1, "reader closed"
invoke-direct {v0, v1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
throw v0
.end method
.method private hasRemaining()Z
.locals 1
.line 1
invoke-direct {p0}, Lcom/google/common/io/CharSequenceReader;->remaining()I
move-result v0
if-lez v0, :cond_0
const/4 v0, 0x1
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
return v0
.end method
.method private remaining()I
.locals 2
.line 1
iget-object v0, p0, Lcom/google/common/io/CharSequenceReader;->seq:Ljava/lang/CharSequence;
invoke-static {v0}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;)Ljava/lang/Object;
.line 2
iget-object v0, p0, Lcom/google/common/io/CharSequenceReader;->seq:Ljava/lang/CharSequence;
invoke-interface {v0}, Ljava/lang/CharSequence;->length()I
move-result v0
iget v1, p0, Lcom/google/common/io/CharSequenceReader;->pos:I
sub-int/2addr v0, v1
return v0
.end method
# virtual methods
.method public declared-synchronized close()V
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
monitor-enter p0
const/4 v0, 0x0
.line 1
:try_start_0
iput-object v0, p0, Lcom/google/common/io/CharSequenceReader;->seq:Ljava/lang/CharSequence;
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 2
monitor-exit p0
return-void
:catchall_0
move-exception v0
monitor-exit p0
throw v0
.end method
.method public declared-synchronized mark(I)V
.locals 2
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
monitor-enter p0
if-ltz p1, :cond_0
const/4 v0, 0x1
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
:try_start_0
const-string v1, "readAheadLimit (%s) may not be negative"
.line 1
invoke-static {v0, v1, p1}, Lcom/google/common/base/Preconditions;->checkArgument(ZLjava/lang/String;I)V
.line 2
invoke-direct {p0}, Lcom/google/common/io/CharSequenceReader;->checkOpen()V
.line 3
iget p1, p0, Lcom/google/common/io/CharSequenceReader;->pos:I
iput p1, p0, Lcom/google/common/io/CharSequenceReader;->mark:I
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 4
monitor-exit p0
return-void
:catchall_0
move-exception p1
monitor-exit p0
throw p1
.end method
.method public markSupported()Z
.locals 1
const/4 v0, 0x1
return v0
.end method
.method public declared-synchronized read()I
.locals 3
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
monitor-enter p0
.line 9
:try_start_0
invoke-direct {p0}, Lcom/google/common/io/CharSequenceReader;->checkOpen()V
.line 10
iget-object v0, p0, Lcom/google/common/io/CharSequenceReader;->seq:Ljava/lang/CharSequence;
invoke-static {v0}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;)Ljava/lang/Object;
.line 11
invoke-direct {p0}, Lcom/google/common/io/CharSequenceReader;->hasRemaining()Z
move-result v0
if-eqz v0, :cond_0
iget-object v0, p0, Lcom/google/common/io/CharSequenceReader;->seq:Ljava/lang/CharSequence;
iget v1, p0, Lcom/google/common/io/CharSequenceReader;->pos:I
add-int/lit8 v2, v1, 0x1
iput v2, p0, Lcom/google/common/io/CharSequenceReader;->pos:I
invoke-interface {v0, v1}, Ljava/lang/CharSequence;->charAt(I)C
move-result v0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
goto :goto_0
:cond_0
const/4 v0, -0x1
:goto_0
monitor-exit p0
return v0
:catchall_0
move-exception v0
monitor-exit p0
throw v0
.end method
.method public declared-synchronized read(Ljava/nio/CharBuffer;)I
.locals 5
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
monitor-enter p0
.line 1
:try_start_0
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
.line 2
invoke-direct {p0}, Lcom/google/common/io/CharSequenceReader;->checkOpen()V
.line 3
iget-object v0, p0, Lcom/google/common/io/CharSequenceReader;->seq:Ljava/lang/CharSequence;
invoke-static {v0}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;)Ljava/lang/Object;
.line 4
invoke-direct {p0}, Lcom/google/common/io/CharSequenceReader;->hasRemaining()Z
move-result v0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
if-nez v0, :cond_0
const/4 p1, -0x1
.line 5
monitor-exit p0
return p1
.line 6
:cond_0
:try_start_1
invoke-virtual {p1}, Ljava/nio/CharBuffer;->remaining()I
move-result v0
invoke-direct {p0}, Lcom/google/common/io/CharSequenceReader;->remaining()I
move-result v1
invoke-static {v0, v1}, Ljava/lang/Math;->min(II)I
move-result v0
const/4 v1, 0x0
:goto_0
if-ge v1, v0, :cond_1
.line 7
iget-object v2, p0, Lcom/google/common/io/CharSequenceReader;->seq:Ljava/lang/CharSequence;
iget v3, p0, Lcom/google/common/io/CharSequenceReader;->pos:I
add-int/lit8 v4, v3, 0x1
iput v4, p0, Lcom/google/common/io/CharSequenceReader;->pos:I
invoke-interface {v2, v3}, Ljava/lang/CharSequence;->charAt(I)C
move-result v2
invoke-virtual {p1, v2}, Ljava/nio/CharBuffer;->put(C)Ljava/nio/CharBuffer;
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
add-int/lit8 v1, v1, 0x1
goto :goto_0
.line 8
:cond_1
monitor-exit p0
return v0
:catchall_0
move-exception p1
monitor-exit p0
throw p1
.end method
.method public declared-synchronized read([CII)I
.locals 5
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
monitor-enter p0
add-int v0, p2, p3
.line 12
:try_start_0
array-length v1, p1
invoke-static {p2, v0, v1}, Lcom/google/common/base/Preconditions;->checkPositionIndexes(III)V
.line 13
invoke-direct {p0}, Lcom/google/common/io/CharSequenceReader;->checkOpen()V
.line 14
iget-object v0, p0, Lcom/google/common/io/CharSequenceReader;->seq:Ljava/lang/CharSequence;
invoke-static {v0}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;)Ljava/lang/Object;
.line 15
invoke-direct {p0}, Lcom/google/common/io/CharSequenceReader;->hasRemaining()Z
move-result v0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
if-nez v0, :cond_0
const/4 p1, -0x1
.line 16
monitor-exit p0
return p1
.line 17
:cond_0
:try_start_1
invoke-direct {p0}, Lcom/google/common/io/CharSequenceReader;->remaining()I
move-result v0
invoke-static {p3, v0}, Ljava/lang/Math;->min(II)I
move-result p3
const/4 v0, 0x0
:goto_0
if-ge v0, p3, :cond_1
add-int v1, p2, v0
.line 18
iget-object v2, p0, Lcom/google/common/io/CharSequenceReader;->seq:Ljava/lang/CharSequence;
iget v3, p0, Lcom/google/common/io/CharSequenceReader;->pos:I
add-int/lit8 v4, v3, 0x1
iput v4, p0, Lcom/google/common/io/CharSequenceReader;->pos:I
invoke-interface {v2, v3}, Ljava/lang/CharSequence;->charAt(I)C
move-result v2
aput-char v2, p1, v1
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
add-int/lit8 v0, v0, 0x1
goto :goto_0
.line 19
:cond_1
monitor-exit p0
return p3
:catchall_0
move-exception p1
monitor-exit p0
throw p1
.end method
.method public declared-synchronized ready()Z
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
monitor-enter p0
.line 1
:try_start_0
invoke-direct {p0}, Lcom/google/common/io/CharSequenceReader;->checkOpen()V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
const/4 v0, 0x1
.line 2
monitor-exit p0
return v0
:catchall_0
move-exception v0
monitor-exit p0
throw v0
.end method
.method public declared-synchronized reset()V
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
monitor-enter p0
.line 1
:try_start_0
invoke-direct {p0}, Lcom/google/common/io/CharSequenceReader;->checkOpen()V
.line 2
iget v0, p0, Lcom/google/common/io/CharSequenceReader;->mark:I
iput v0, p0, Lcom/google/common/io/CharSequenceReader;->pos:I
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 3
monitor-exit p0
return-void
:catchall_0
move-exception v0
monitor-exit p0
throw v0
.end method
.method public declared-synchronized skip(J)J
.locals 2
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
monitor-enter p0
const-wide/16 v0, 0x0
cmp-long v0, p1, v0
if-ltz v0, :cond_0
const/4 v0, 0x1
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
:try_start_0
const-string v1, "n (%s) may not be negative"
.line 1
invoke-static {v0, v1, p1, p2}, Lcom/google/common/base/Preconditions;->checkArgument(ZLjava/lang/String;J)V
.line 2
invoke-direct {p0}, Lcom/google/common/io/CharSequenceReader;->checkOpen()V
.line 3
invoke-direct {p0}, Lcom/google/common/io/CharSequenceReader;->remaining()I
move-result v0
int-to-long v0, v0
invoke-static {v0, v1, p1, p2}, Ljava/lang/Math;->min(JJ)J
move-result-wide p1
long-to-int p1, p1
.line 4
iget p2, p0, Lcom/google/common/io/CharSequenceReader;->pos:I
add-int/2addr p2, p1
iput p2, p0, Lcom/google/common/io/CharSequenceReader;->pos:I
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
int-to-long p1, p1
.line 5
monitor-exit p0
return-wide p1
:catchall_0
move-exception p1
monitor-exit p0
throw p1
.end method
@@ -0,0 +1,334 @@
.class public abstract Lcom/google/common/io/CharSink;
.super Ljava/lang/Object;
.source "CharSink.java"
# annotations
.annotation build Lcom/google/common/annotations/GwtIncompatible;
.end annotation
.annotation runtime Lcom/google/common/io/ElementTypesAreNonnullByDefault;
.end annotation
# direct methods
.method public constructor <init>()V
.locals 0
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
# virtual methods
.method public openBufferedStream()Ljava/io/Writer;
.locals 2
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
invoke-virtual {p0}, Lcom/google/common/io/CharSink;->openStream()Ljava/io/Writer;
move-result-object v0
.line 2
instance-of v1, v0, Ljava/io/BufferedWriter;
if-eqz v1, :cond_0
.line 3
check-cast v0, Ljava/io/BufferedWriter;
goto :goto_0
.line 4
:cond_0
new-instance v1, Ljava/io/BufferedWriter;
invoke-direct {v1, v0}, Ljava/io/BufferedWriter;-><init>(Ljava/io/Writer;)V
move-object v0, v1
:goto_0
return-object v0
.end method
.method public abstract openStream()Ljava/io/Writer;
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.end method
.method public write(Ljava/lang/CharSequence;)V
.locals 2
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
.line 2
invoke-static {}, Lcom/google/common/io/Closer;->create()Lcom/google/common/io/Closer;
move-result-object v0
.line 3
:try_start_0
invoke-virtual {p0}, Lcom/google/common/io/CharSink;->openStream()Ljava/io/Writer;
move-result-object v1
invoke-virtual {v0, v1}, Lcom/google/common/io/Closer;->register(Ljava/io/Closeable;)Ljava/io/Closeable;
move-result-object v1
check-cast v1, Ljava/io/Writer;
.line 4
invoke-virtual {v1, p1}, Ljava/io/Writer;->append(Ljava/lang/CharSequence;)Ljava/io/Writer;
.line 5
invoke-virtual {v1}, Ljava/io/Writer;->flush()V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 6
invoke-virtual {v0}, Lcom/google/common/io/Closer;->close()V
return-void
:catchall_0
move-exception p1
.line 7
:try_start_1
invoke-virtual {v0, p1}, Lcom/google/common/io/Closer;->rethrow(Ljava/lang/Throwable;)Ljava/lang/RuntimeException;
move-result-object p1
throw p1
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_1
:catchall_1
move-exception p1
.line 8
invoke-virtual {v0}, Lcom/google/common/io/Closer;->close()V
.line 9
throw p1
.end method
.method public writeFrom(Ljava/lang/Readable;)J
.locals 4
.annotation build Lcom/google/errorprone/annotations/CanIgnoreReturnValue;
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
.line 2
invoke-static {}, Lcom/google/common/io/Closer;->create()Lcom/google/common/io/Closer;
move-result-object v0
.line 3
:try_start_0
invoke-virtual {p0}, Lcom/google/common/io/CharSink;->openStream()Ljava/io/Writer;
move-result-object v1
invoke-virtual {v0, v1}, Lcom/google/common/io/Closer;->register(Ljava/io/Closeable;)Ljava/io/Closeable;
move-result-object v1
check-cast v1, Ljava/io/Writer;
.line 4
invoke-static {p1, v1}, Lcom/google/common/io/CharStreams;->copy(Ljava/lang/Readable;Ljava/lang/Appendable;)J
move-result-wide v2
.line 5
invoke-virtual {v1}, Ljava/io/Writer;->flush()V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 6
invoke-virtual {v0}, Lcom/google/common/io/Closer;->close()V
return-wide v2
:catchall_0
move-exception p1
.line 7
:try_start_1
invoke-virtual {v0, p1}, Lcom/google/common/io/Closer;->rethrow(Ljava/lang/Throwable;)Ljava/lang/RuntimeException;
move-result-object p1
throw p1
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_1
:catchall_1
move-exception p1
.line 8
invoke-virtual {v0}, Lcom/google/common/io/Closer;->close()V
.line 9
throw p1
.end method
.method public writeLines(Ljava/lang/Iterable;)V
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/Iterable<",
"+",
"Ljava/lang/CharSequence;",
">;)V"
}
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
const-string v0, "line.separator"
.line 1
invoke-static {v0}, Ljava/lang/System;->getProperty(Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
invoke-virtual {p0, p1, v0}, Lcom/google/common/io/CharSink;->writeLines(Ljava/lang/Iterable;Ljava/lang/String;)V
return-void
.end method
.method public writeLines(Ljava/lang/Iterable;Ljava/lang/String;)V
.locals 3
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/Iterable<",
"+",
"Ljava/lang/CharSequence;",
">;",
"Ljava/lang/String;",
")V"
}
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 2
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
.line 3
invoke-static {p2}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
.line 4
invoke-static {}, Lcom/google/common/io/Closer;->create()Lcom/google/common/io/Closer;
move-result-object v0
.line 5
:try_start_0
invoke-virtual {p0}, Lcom/google/common/io/CharSink;->openBufferedStream()Ljava/io/Writer;
move-result-object v1
invoke-virtual {v0, v1}, Lcom/google/common/io/Closer;->register(Ljava/io/Closeable;)Ljava/io/Closeable;
move-result-object v1
check-cast v1, Ljava/io/Writer;
.line 6
invoke-interface {p1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
move-result-object p1
:goto_0
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
move-result v2
if-eqz v2, :cond_0
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v2
check-cast v2, Ljava/lang/CharSequence;
.line 7
invoke-virtual {v1, v2}, Ljava/io/Writer;->append(Ljava/lang/CharSequence;)Ljava/io/Writer;
move-result-object v2
invoke-virtual {v2, p2}, Ljava/io/Writer;->append(Ljava/lang/CharSequence;)Ljava/io/Writer;
goto :goto_0
.line 8
:cond_0
invoke-virtual {v1}, Ljava/io/Writer;->flush()V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 9
invoke-virtual {v0}, Lcom/google/common/io/Closer;->close()V
return-void
:catchall_0
move-exception p1
.line 10
:try_start_1
invoke-virtual {v0, p1}, Lcom/google/common/io/Closer;->rethrow(Ljava/lang/Throwable;)Ljava/lang/RuntimeException;
move-result-object p1
throw p1
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_1
:catchall_1
move-exception p1
.line 11
invoke-virtual {v0}, Lcom/google/common/io/Closer;->close()V
.line 12
throw p1
.end method
@@ -0,0 +1,135 @@
.class final Lcom/google/common/io/CharSource$AsByteSource;
.super Lcom/google/common/io/ByteSource;
.source "CharSource.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/google/common/io/CharSource;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x11
name = "AsByteSource"
.end annotation
# instance fields
.field public final charset:Ljava/nio/charset/Charset;
.field public final synthetic this$0:Lcom/google/common/io/CharSource;
# direct methods
.method public constructor <init>(Lcom/google/common/io/CharSource;Ljava/nio/charset/Charset;)V
.locals 0
.line 1
iput-object p1, p0, Lcom/google/common/io/CharSource$AsByteSource;->this$0:Lcom/google/common/io/CharSource;
invoke-direct {p0}, Lcom/google/common/io/ByteSource;-><init>()V
.line 2
invoke-static {p2}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p1
check-cast p1, Ljava/nio/charset/Charset;
iput-object p1, p0, Lcom/google/common/io/CharSource$AsByteSource;->charset:Ljava/nio/charset/Charset;
return-void
.end method
# virtual methods
.method public asCharSource(Ljava/nio/charset/Charset;)Lcom/google/common/io/CharSource;
.locals 1
.line 1
iget-object v0, p0, Lcom/google/common/io/CharSource$AsByteSource;->charset:Ljava/nio/charset/Charset;
invoke-virtual {p1, v0}, Ljava/nio/charset/Charset;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_0
.line 2
iget-object p1, p0, Lcom/google/common/io/CharSource$AsByteSource;->this$0:Lcom/google/common/io/CharSource;
return-object p1
.line 3
:cond_0
invoke-super {p0, p1}, Lcom/google/common/io/ByteSource;->asCharSource(Ljava/nio/charset/Charset;)Lcom/google/common/io/CharSource;
move-result-object p1
return-object p1
.end method
.method public openStream()Ljava/io/InputStream;
.locals 4
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
new-instance v0, Lcom/google/common/io/ReaderInputStream;
iget-object v1, p0, Lcom/google/common/io/CharSource$AsByteSource;->this$0:Lcom/google/common/io/CharSource;
invoke-virtual {v1}, Lcom/google/common/io/CharSource;->openStream()Ljava/io/Reader;
move-result-object v1
iget-object v2, p0, Lcom/google/common/io/CharSource$AsByteSource;->charset:Ljava/nio/charset/Charset;
const/16 v3, 0x2000
invoke-direct {v0, v1, v2, v3}, Lcom/google/common/io/ReaderInputStream;-><init>(Ljava/io/Reader;Ljava/nio/charset/Charset;I)V
return-object v0
.end method
.method public toString()Ljava/lang/String;
.locals 5
.line 1
iget-object v0, p0, Lcom/google/common/io/CharSource$AsByteSource;->this$0:Lcom/google/common/io/CharSource;
invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object v0
iget-object v1, p0, Lcom/google/common/io/CharSource$AsByteSource;->charset:Ljava/nio/charset/Charset;
invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
move-result-object v1
const/16 v2, 0xf
invoke-static {v0, v2}, Lcom/android/billingclient/api/d;->a(Ljava/lang/String;I)I
move-result v2
invoke-virtual {v1}, Ljava/lang/String;->length()I
move-result v3
add-int/2addr v3, v2
const-string v2, ".asByteSource("
const-string v4, ")"
invoke-static {v3, v0, v2, v1, v4}, Lcom/android/billingclient/api/f;->a(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
return-object v0
.end method
@@ -0,0 +1,133 @@
.class Lcom/google/common/io/CharSource$CharSequenceCharSource$1;
.super Lcom/google/common/collect/AbstractIterator;
.source "CharSource.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
value = Lcom/google/common/io/CharSource$CharSequenceCharSource;->linesIterator()Ljava/util/Iterator;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1
name = null
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"Lcom/google/common/collect/AbstractIterator<",
"Ljava/lang/String;",
">;"
}
.end annotation
# instance fields
.field public lines:Ljava/util/Iterator;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/Iterator<",
"Ljava/lang/String;",
">;"
}
.end annotation
.end field
.field public final synthetic this$0:Lcom/google/common/io/CharSource$CharSequenceCharSource;
# direct methods
.method public constructor <init>(Lcom/google/common/io/CharSource$CharSequenceCharSource;)V
.locals 1
.line 1
iput-object p1, p0, Lcom/google/common/io/CharSource$CharSequenceCharSource$1;->this$0:Lcom/google/common/io/CharSource$CharSequenceCharSource;
invoke-direct {p0}, Lcom/google/common/collect/AbstractIterator;-><init>()V
.line 2
invoke-static {}, Lcom/google/common/io/CharSource$CharSequenceCharSource;->access$100()Lcom/google/common/base/Splitter;
move-result-object v0
iget-object p1, p1, Lcom/google/common/io/CharSource$CharSequenceCharSource;->seq:Ljava/lang/CharSequence;
invoke-virtual {v0, p1}, Lcom/google/common/base/Splitter;->split(Ljava/lang/CharSequence;)Ljava/lang/Iterable;
move-result-object p1
invoke-interface {p1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
move-result-object p1
iput-object p1, p0, Lcom/google/common/io/CharSource$CharSequenceCharSource$1;->lines:Ljava/util/Iterator;
return-void
.end method
# virtual methods
.method public bridge synthetic computeNext()Ljava/lang/Object;
.locals 1
.annotation runtime Ljavax/annotation/CheckForNull;
.end annotation
.line 1
invoke-virtual {p0}, Lcom/google/common/io/CharSource$CharSequenceCharSource$1;->computeNext()Ljava/lang/String;
move-result-object v0
return-object v0
.end method
.method public computeNext()Ljava/lang/String;
.locals 2
.annotation runtime Ljavax/annotation/CheckForNull;
.end annotation
.line 2
iget-object v0, p0, Lcom/google/common/io/CharSource$CharSequenceCharSource$1;->lines:Ljava/util/Iterator;
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v0
if-eqz v0, :cond_1
.line 3
iget-object v0, p0, Lcom/google/common/io/CharSource$CharSequenceCharSource$1;->lines:Ljava/util/Iterator;
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/lang/String;
.line 4
iget-object v1, p0, Lcom/google/common/io/CharSource$CharSequenceCharSource$1;->lines:Ljava/util/Iterator;
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
move-result v1
if-nez v1, :cond_0
invoke-virtual {v0}, Ljava/lang/String;->isEmpty()Z
move-result v1
if-nez v1, :cond_1
:cond_0
return-object v0
.line 5
:cond_1
invoke-virtual {p0}, Lcom/google/common/collect/AbstractIterator;->endOfData()Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/lang/String;
return-object v0
.end method
@@ -0,0 +1,324 @@
.class Lcom/google/common/io/CharSource$CharSequenceCharSource;
.super Lcom/google/common/io/CharSource;
.source "CharSource.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/google/common/io/CharSource;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x9
name = "CharSequenceCharSource"
.end annotation
# static fields
.field private static final LINE_SPLITTER:Lcom/google/common/base/Splitter;
# instance fields
.field public final seq:Ljava/lang/CharSequence;
# direct methods
.method public static constructor <clinit>()V
.locals 1
const-string v0, "\r\n|\n|\r"
.line 1
invoke-static {v0}, Lcom/google/common/base/Splitter;->onPattern(Ljava/lang/String;)Lcom/google/common/base/Splitter;
move-result-object v0
sput-object v0, Lcom/google/common/io/CharSource$CharSequenceCharSource;->LINE_SPLITTER:Lcom/google/common/base/Splitter;
return-void
.end method
.method public constructor <init>(Ljava/lang/CharSequence;)V
.locals 0
.line 1
invoke-direct {p0}, Lcom/google/common/io/CharSource;-><init>()V
.line 2
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p1
check-cast p1, Ljava/lang/CharSequence;
iput-object p1, p0, Lcom/google/common/io/CharSource$CharSequenceCharSource;->seq:Ljava/lang/CharSequence;
return-void
.end method
.method public static synthetic access$100()Lcom/google/common/base/Splitter;
.locals 1
.line 1
sget-object v0, Lcom/google/common/io/CharSource$CharSequenceCharSource;->LINE_SPLITTER:Lcom/google/common/base/Splitter;
return-object v0
.end method
.method private linesIterator()Ljava/util/Iterator;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Ljava/util/Iterator<",
"Ljava/lang/String;",
">;"
}
.end annotation
.line 1
new-instance v0, Lcom/google/common/io/CharSource$CharSequenceCharSource$1;
invoke-direct {v0, p0}, Lcom/google/common/io/CharSource$CharSequenceCharSource$1;-><init>(Lcom/google/common/io/CharSource$CharSequenceCharSource;)V
return-object v0
.end method
# virtual methods
.method public isEmpty()Z
.locals 1
.line 1
iget-object v0, p0, Lcom/google/common/io/CharSource$CharSequenceCharSource;->seq:Ljava/lang/CharSequence;
invoke-interface {v0}, Ljava/lang/CharSequence;->length()I
move-result v0
if-nez v0, :cond_0
const/4 v0, 0x1
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
return v0
.end method
.method public length()J
.locals 2
.line 1
iget-object v0, p0, Lcom/google/common/io/CharSource$CharSequenceCharSource;->seq:Ljava/lang/CharSequence;
invoke-interface {v0}, Ljava/lang/CharSequence;->length()I
move-result v0
int-to-long v0, v0
return-wide v0
.end method
.method public lengthIfKnown()Lcom/google/common/base/Optional;
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Lcom/google/common/base/Optional<",
"Ljava/lang/Long;",
">;"
}
.end annotation
.line 1
iget-object v0, p0, Lcom/google/common/io/CharSource$CharSequenceCharSource;->seq:Ljava/lang/CharSequence;
invoke-interface {v0}, Ljava/lang/CharSequence;->length()I
move-result v0
int-to-long v0, v0
invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
move-result-object v0
invoke-static {v0}, Lcom/google/common/base/Optional;->of(Ljava/lang/Object;)Lcom/google/common/base/Optional;
move-result-object v0
return-object v0
.end method
.method public openStream()Ljava/io/Reader;
.locals 2
.line 1
new-instance v0, Lcom/google/common/io/CharSequenceReader;
iget-object v1, p0, Lcom/google/common/io/CharSource$CharSequenceCharSource;->seq:Ljava/lang/CharSequence;
invoke-direct {v0, v1}, Lcom/google/common/io/CharSequenceReader;-><init>(Ljava/lang/CharSequence;)V
return-object v0
.end method
.method public read()Ljava/lang/String;
.locals 1
.line 1
iget-object v0, p0, Lcom/google/common/io/CharSource$CharSequenceCharSource;->seq:Ljava/lang/CharSequence;
invoke-interface {v0}, Ljava/lang/CharSequence;->toString()Ljava/lang/String;
move-result-object v0
return-object v0
.end method
.method public readFirstLine()Ljava/lang/String;
.locals 2
.annotation runtime Ljavax/annotation/CheckForNull;
.end annotation
.line 1
invoke-direct {p0}, Lcom/google/common/io/CharSource$CharSequenceCharSource;->linesIterator()Ljava/util/Iterator;
move-result-object v0
.line 2
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v1
if-eqz v1, :cond_0
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/lang/String;
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
return-object v0
.end method
.method public readLines()Lcom/google/common/collect/ImmutableList;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Lcom/google/common/collect/ImmutableList<",
"Ljava/lang/String;",
">;"
}
.end annotation
.line 1
invoke-direct {p0}, Lcom/google/common/io/CharSource$CharSequenceCharSource;->linesIterator()Ljava/util/Iterator;
move-result-object v0
invoke-static {v0}, Lcom/google/common/collect/ImmutableList;->copyOf(Ljava/util/Iterator;)Lcom/google/common/collect/ImmutableList;
move-result-object v0
return-object v0
.end method
.method public readLines(Lcom/google/common/io/LineProcessor;)Ljava/lang/Object;
.locals 2
.annotation runtime Lcom/google/common/io/ParametricNullness;
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">(",
"Lcom/google/common/io/LineProcessor<",
"TT;>;)TT;"
}
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 2
invoke-direct {p0}, Lcom/google/common/io/CharSource$CharSequenceCharSource;->linesIterator()Ljava/util/Iterator;
move-result-object v0
.line 3
:cond_0
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v1
if-eqz v1, :cond_1
.line 4
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v1
check-cast v1, Ljava/lang/String;
invoke-interface {p1, v1}, Lcom/google/common/io/LineProcessor;->processLine(Ljava/lang/String;)Z
move-result v1
if-nez v1, :cond_0
.line 5
:cond_1
invoke-interface {p1}, Lcom/google/common/io/LineProcessor;->getResult()Ljava/lang/Object;
move-result-object p1
return-object p1
.end method
.method public toString()Ljava/lang/String;
.locals 4
.line 1
iget-object v0, p0, Lcom/google/common/io/CharSource$CharSequenceCharSource;->seq:Ljava/lang/CharSequence;
const/16 v1, 0x1e
const-string v2, "..."
invoke-static {v0, v1, v2}, Lcom/google/common/base/Ascii;->truncate(Ljava/lang/CharSequence;ILjava/lang/String;)Ljava/lang/String;
move-result-object v0
const/16 v1, 0x11
invoke-static {v0, v1}, Lcom/android/billingclient/api/d;->a(Ljava/lang/String;I)I
move-result v1
const-string v2, "CharSource.wrap("
const-string v3, ")"
invoke-static {v1, v2, v0, v3}, Lcom/google/android/gms/ads/internal/a;->a(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
return-object v0
.end method
@@ -0,0 +1,276 @@
.class final Lcom/google/common/io/CharSource$ConcatenatedCharSource;
.super Lcom/google/common/io/CharSource;
.source "CharSource.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/google/common/io/CharSource;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = "ConcatenatedCharSource"
.end annotation
# instance fields
.field private final sources:Ljava/lang/Iterable;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/lang/Iterable<",
"+",
"Lcom/google/common/io/CharSource;",
">;"
}
.end annotation
.end field
# direct methods
.method public constructor <init>(Ljava/lang/Iterable;)V
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/Iterable<",
"+",
"Lcom/google/common/io/CharSource;",
">;)V"
}
.end annotation
.line 1
invoke-direct {p0}, Lcom/google/common/io/CharSource;-><init>()V
.line 2
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p1
check-cast p1, Ljava/lang/Iterable;
iput-object p1, p0, Lcom/google/common/io/CharSource$ConcatenatedCharSource;->sources:Ljava/lang/Iterable;
return-void
.end method
# virtual methods
.method public isEmpty()Z
.locals 2
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
iget-object v0, p0, Lcom/google/common/io/CharSource$ConcatenatedCharSource;->sources:Ljava/lang/Iterable;
invoke-interface {v0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
move-result-object v0
:cond_0
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v1
if-eqz v1, :cond_1
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v1
check-cast v1, Lcom/google/common/io/CharSource;
.line 2
invoke-virtual {v1}, Lcom/google/common/io/CharSource;->isEmpty()Z
move-result v1
if-nez v1, :cond_0
const/4 v0, 0x0
return v0
:cond_1
const/4 v0, 0x1
return v0
.end method
.method public length()J
.locals 5
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
iget-object v0, p0, Lcom/google/common/io/CharSource$ConcatenatedCharSource;->sources:Ljava/lang/Iterable;
invoke-interface {v0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
move-result-object v0
const-wide/16 v1, 0x0
:goto_0
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v3
if-eqz v3, :cond_0
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v3
check-cast v3, Lcom/google/common/io/CharSource;
.line 2
invoke-virtual {v3}, Lcom/google/common/io/CharSource;->length()J
move-result-wide v3
add-long/2addr v1, v3
goto :goto_0
:cond_0
return-wide v1
.end method
.method public lengthIfKnown()Lcom/google/common/base/Optional;
.locals 5
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Lcom/google/common/base/Optional<",
"Ljava/lang/Long;",
">;"
}
.end annotation
.line 1
iget-object v0, p0, Lcom/google/common/io/CharSource$ConcatenatedCharSource;->sources:Ljava/lang/Iterable;
invoke-interface {v0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
move-result-object v0
const-wide/16 v1, 0x0
:goto_0
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v3
if-eqz v3, :cond_1
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v3
check-cast v3, Lcom/google/common/io/CharSource;
.line 2
invoke-virtual {v3}, Lcom/google/common/io/CharSource;->lengthIfKnown()Lcom/google/common/base/Optional;
move-result-object v3
.line 3
invoke-virtual {v3}, Lcom/google/common/base/Optional;->isPresent()Z
move-result v4
if-nez v4, :cond_0
.line 4
invoke-static {}, Lcom/google/common/base/Optional;->absent()Lcom/google/common/base/Optional;
move-result-object v0
return-object v0
.line 5
:cond_0
invoke-virtual {v3}, Lcom/google/common/base/Optional;->get()Ljava/lang/Object;
move-result-object v3
check-cast v3, Ljava/lang/Long;
invoke-virtual {v3}, Ljava/lang/Long;->longValue()J
move-result-wide v3
add-long/2addr v1, v3
goto :goto_0
.line 6
:cond_1
invoke-static {v1, v2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
move-result-object v0
invoke-static {v0}, Lcom/google/common/base/Optional;->of(Ljava/lang/Object;)Lcom/google/common/base/Optional;
move-result-object v0
return-object v0
.end method
.method public openStream()Ljava/io/Reader;
.locals 2
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
new-instance v0, Lcom/google/common/io/MultiReader;
iget-object v1, p0, Lcom/google/common/io/CharSource$ConcatenatedCharSource;->sources:Ljava/lang/Iterable;
invoke-interface {v1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
move-result-object v1
invoke-direct {v0, v1}, Lcom/google/common/io/MultiReader;-><init>(Ljava/util/Iterator;)V
return-object v0
.end method
.method public toString()Ljava/lang/String;
.locals 4
.line 1
iget-object v0, p0, Lcom/google/common/io/CharSource$ConcatenatedCharSource;->sources:Ljava/lang/Iterable;
invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/String;->length()I
move-result v1
add-int/lit8 v1, v1, 0x13
const-string v2, "CharSource.concat("
const-string v3, ")"
invoke-static {v1, v2, v0, v3}, Lcom/google/android/gms/ads/internal/a;->a(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
return-object v0
.end method
@@ -0,0 +1,63 @@
.class final Lcom/google/common/io/CharSource$EmptyCharSource;
.super Lcom/google/common/io/CharSource$StringCharSource;
.source "CharSource.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/google/common/io/CharSource;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = "EmptyCharSource"
.end annotation
# static fields
.field private static final INSTANCE:Lcom/google/common/io/CharSource$EmptyCharSource;
# direct methods
.method public static constructor <clinit>()V
.locals 1
.line 1
new-instance v0, Lcom/google/common/io/CharSource$EmptyCharSource;
invoke-direct {v0}, Lcom/google/common/io/CharSource$EmptyCharSource;-><init>()V
sput-object v0, Lcom/google/common/io/CharSource$EmptyCharSource;->INSTANCE:Lcom/google/common/io/CharSource$EmptyCharSource;
return-void
.end method
.method private constructor <init>()V
.locals 1
const-string v0, ""
.line 1
invoke-direct {p0, v0}, Lcom/google/common/io/CharSource$StringCharSource;-><init>(Ljava/lang/String;)V
return-void
.end method
.method public static synthetic access$000()Lcom/google/common/io/CharSource$EmptyCharSource;
.locals 1
.line 1
sget-object v0, Lcom/google/common/io/CharSource$EmptyCharSource;->INSTANCE:Lcom/google/common/io/CharSource$EmptyCharSource;
return-object v0
.end method
# virtual methods
.method public toString()Ljava/lang/String;
.locals 1
const-string v0, "CharSource.empty()"
return-object v0
.end method
@@ -0,0 +1,141 @@
.class Lcom/google/common/io/CharSource$StringCharSource;
.super Lcom/google/common/io/CharSource$CharSequenceCharSource;
.source "CharSource.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/google/common/io/CharSource;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x9
name = "StringCharSource"
.end annotation
# direct methods
.method public constructor <init>(Ljava/lang/String;)V
.locals 0
.line 1
invoke-direct {p0, p1}, Lcom/google/common/io/CharSource$CharSequenceCharSource;-><init>(Ljava/lang/CharSequence;)V
return-void
.end method
# virtual methods
.method public copyTo(Lcom/google/common/io/CharSink;)J
.locals 3
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 3
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
.line 4
invoke-static {}, Lcom/google/common/io/Closer;->create()Lcom/google/common/io/Closer;
move-result-object v0
.line 5
:try_start_0
invoke-virtual {p1}, Lcom/google/common/io/CharSink;->openStream()Ljava/io/Writer;
move-result-object p1
invoke-virtual {v0, p1}, Lcom/google/common/io/Closer;->register(Ljava/io/Closeable;)Ljava/io/Closeable;
move-result-object p1
check-cast p1, Ljava/io/Writer;
.line 6
iget-object v1, p0, Lcom/google/common/io/CharSource$CharSequenceCharSource;->seq:Ljava/lang/CharSequence;
check-cast v1, Ljava/lang/String;
invoke-virtual {p1, v1}, Ljava/io/Writer;->write(Ljava/lang/String;)V
.line 7
iget-object p1, p0, Lcom/google/common/io/CharSource$CharSequenceCharSource;->seq:Ljava/lang/CharSequence;
invoke-interface {p1}, Ljava/lang/CharSequence;->length()I
move-result p1
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
int-to-long v1, p1
.line 8
invoke-virtual {v0}, Lcom/google/common/io/Closer;->close()V
return-wide v1
:catchall_0
move-exception p1
.line 9
:try_start_1
invoke-virtual {v0, p1}, Lcom/google/common/io/Closer;->rethrow(Ljava/lang/Throwable;)Ljava/lang/RuntimeException;
move-result-object p1
throw p1
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_1
:catchall_1
move-exception p1
.line 10
invoke-virtual {v0}, Lcom/google/common/io/Closer;->close()V
.line 11
throw p1
.end method
.method public copyTo(Ljava/lang/Appendable;)J
.locals 2
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
iget-object v0, p0, Lcom/google/common/io/CharSource$CharSequenceCharSource;->seq:Ljava/lang/CharSequence;
invoke-interface {p1, v0}, Ljava/lang/Appendable;->append(Ljava/lang/CharSequence;)Ljava/lang/Appendable;
.line 2
iget-object p1, p0, Lcom/google/common/io/CharSource$CharSequenceCharSource;->seq:Ljava/lang/CharSequence;
invoke-interface {p1}, Ljava/lang/CharSequence;->length()I
move-result p1
int-to-long v0, p1
return-wide v0
.end method
.method public openStream()Ljava/io/Reader;
.locals 2
.line 1
new-instance v0, Ljava/io/StringReader;
iget-object v1, p0, Lcom/google/common/io/CharSource$CharSequenceCharSource;->seq:Ljava/lang/CharSequence;
check-cast v1, Ljava/lang/String;
invoke-direct {v0, v1}, Ljava/io/StringReader;-><init>(Ljava/lang/String;)V
return-object v0
.end method
@@ -0,0 +1,880 @@
.class public abstract Lcom/google/common/io/CharSource;
.super Ljava/lang/Object;
.source "CharSource.java"
# annotations
.annotation build Lcom/google/common/annotations/GwtIncompatible;
.end annotation
.annotation runtime Lcom/google/common/io/ElementTypesAreNonnullByDefault;
.end annotation
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/google/common/io/CharSource$ConcatenatedCharSource;,
Lcom/google/common/io/CharSource$EmptyCharSource;,
Lcom/google/common/io/CharSource$StringCharSource;,
Lcom/google/common/io/CharSource$CharSequenceCharSource;,
Lcom/google/common/io/CharSource$AsByteSource;
}
.end annotation
# direct methods
.method public constructor <init>()V
.locals 0
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static concat(Ljava/lang/Iterable;)Lcom/google/common/io/CharSource;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/Iterable<",
"+",
"Lcom/google/common/io/CharSource;",
">;)",
"Lcom/google/common/io/CharSource;"
}
.end annotation
.line 1
new-instance v0, Lcom/google/common/io/CharSource$ConcatenatedCharSource;
invoke-direct {v0, p0}, Lcom/google/common/io/CharSource$ConcatenatedCharSource;-><init>(Ljava/lang/Iterable;)V
return-object v0
.end method
.method public static concat(Ljava/util/Iterator;)Lcom/google/common/io/CharSource;
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/Iterator<",
"+",
"Lcom/google/common/io/CharSource;",
">;)",
"Lcom/google/common/io/CharSource;"
}
.end annotation
.line 2
invoke-static {p0}, Lcom/google/common/collect/ImmutableList;->copyOf(Ljava/util/Iterator;)Lcom/google/common/collect/ImmutableList;
move-result-object p0
invoke-static {p0}, Lcom/google/common/io/CharSource;->concat(Ljava/lang/Iterable;)Lcom/google/common/io/CharSource;
move-result-object p0
return-object p0
.end method
.method public static varargs concat([Lcom/google/common/io/CharSource;)Lcom/google/common/io/CharSource;
.locals 0
.line 3
invoke-static {p0}, Lcom/google/common/collect/ImmutableList;->copyOf([Ljava/lang/Object;)Lcom/google/common/collect/ImmutableList;
move-result-object p0
invoke-static {p0}, Lcom/google/common/io/CharSource;->concat(Ljava/lang/Iterable;)Lcom/google/common/io/CharSource;
move-result-object p0
return-object p0
.end method
.method private countBySkipping(Ljava/io/Reader;)J
.locals 7
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
const-wide/16 v0, 0x0
move-wide v2, v0
:goto_0
const-wide v4, 0x7fffffffffffffffL
.line 1
invoke-virtual {p1, v4, v5}, Ljava/io/Reader;->skip(J)J
move-result-wide v4
cmp-long v6, v4, v0
if-eqz v6, :cond_0
add-long/2addr v2, v4
goto :goto_0
:cond_0
return-wide v2
.end method
.method public static empty()Lcom/google/common/io/CharSource;
.locals 1
.line 1
invoke-static {}, Lcom/google/common/io/CharSource$EmptyCharSource;->access$000()Lcom/google/common/io/CharSource$EmptyCharSource;
move-result-object v0
return-object v0
.end method
.method public static wrap(Ljava/lang/CharSequence;)Lcom/google/common/io/CharSource;
.locals 1
.line 1
instance-of v0, p0, Ljava/lang/String;
if-eqz v0, :cond_0
.line 2
new-instance v0, Lcom/google/common/io/CharSource$StringCharSource;
check-cast p0, Ljava/lang/String;
invoke-direct {v0, p0}, Lcom/google/common/io/CharSource$StringCharSource;-><init>(Ljava/lang/String;)V
goto :goto_0
.line 3
:cond_0
new-instance v0, Lcom/google/common/io/CharSource$CharSequenceCharSource;
invoke-direct {v0, p0}, Lcom/google/common/io/CharSource$CharSequenceCharSource;-><init>(Ljava/lang/CharSequence;)V
:goto_0
return-object v0
.end method
# virtual methods
.method public asByteSource(Ljava/nio/charset/Charset;)Lcom/google/common/io/ByteSource;
.locals 1
.annotation build Lcom/google/common/annotations/Beta;
.end annotation
.line 1
new-instance v0, Lcom/google/common/io/CharSource$AsByteSource;
invoke-direct {v0, p0, p1}, Lcom/google/common/io/CharSource$AsByteSource;-><init>(Lcom/google/common/io/CharSource;Ljava/nio/charset/Charset;)V
return-object v0
.end method
.method public copyTo(Lcom/google/common/io/CharSink;)J
.locals 3
.annotation build Lcom/google/errorprone/annotations/CanIgnoreReturnValue;
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 9
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
.line 10
invoke-static {}, Lcom/google/common/io/Closer;->create()Lcom/google/common/io/Closer;
move-result-object v0
.line 11
:try_start_0
invoke-virtual {p0}, Lcom/google/common/io/CharSource;->openStream()Ljava/io/Reader;
move-result-object v1
invoke-virtual {v0, v1}, Lcom/google/common/io/Closer;->register(Ljava/io/Closeable;)Ljava/io/Closeable;
move-result-object v1
check-cast v1, Ljava/io/Reader;
.line 12
invoke-virtual {p1}, Lcom/google/common/io/CharSink;->openStream()Ljava/io/Writer;
move-result-object p1
invoke-virtual {v0, p1}, Lcom/google/common/io/Closer;->register(Ljava/io/Closeable;)Ljava/io/Closeable;
move-result-object p1
check-cast p1, Ljava/io/Writer;
.line 13
invoke-static {v1, p1}, Lcom/google/common/io/CharStreams;->copy(Ljava/lang/Readable;Ljava/lang/Appendable;)J
move-result-wide v1
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 14
invoke-virtual {v0}, Lcom/google/common/io/Closer;->close()V
return-wide v1
:catchall_0
move-exception p1
.line 15
:try_start_1
invoke-virtual {v0, p1}, Lcom/google/common/io/Closer;->rethrow(Ljava/lang/Throwable;)Ljava/lang/RuntimeException;
move-result-object p1
throw p1
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_1
:catchall_1
move-exception p1
.line 16
invoke-virtual {v0}, Lcom/google/common/io/Closer;->close()V
.line 17
throw p1
.end method
.method public copyTo(Ljava/lang/Appendable;)J
.locals 3
.annotation build Lcom/google/errorprone/annotations/CanIgnoreReturnValue;
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
.line 2
invoke-static {}, Lcom/google/common/io/Closer;->create()Lcom/google/common/io/Closer;
move-result-object v0
.line 3
:try_start_0
invoke-virtual {p0}, Lcom/google/common/io/CharSource;->openStream()Ljava/io/Reader;
move-result-object v1
invoke-virtual {v0, v1}, Lcom/google/common/io/Closer;->register(Ljava/io/Closeable;)Ljava/io/Closeable;
move-result-object v1
check-cast v1, Ljava/io/Reader;
.line 4
invoke-static {v1, p1}, Lcom/google/common/io/CharStreams;->copy(Ljava/lang/Readable;Ljava/lang/Appendable;)J
move-result-wide v1
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 5
invoke-virtual {v0}, Lcom/google/common/io/Closer;->close()V
return-wide v1
:catchall_0
move-exception p1
.line 6
:try_start_1
invoke-virtual {v0, p1}, Lcom/google/common/io/Closer;->rethrow(Ljava/lang/Throwable;)Ljava/lang/RuntimeException;
move-result-object p1
throw p1
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_1
:catchall_1
move-exception p1
.line 7
invoke-virtual {v0}, Lcom/google/common/io/Closer;->close()V
.line 8
throw p1
.end method
.method public isEmpty()Z
.locals 6
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
invoke-virtual {p0}, Lcom/google/common/io/CharSource;->lengthIfKnown()Lcom/google/common/base/Optional;
move-result-object v0
.line 2
invoke-virtual {v0}, Lcom/google/common/base/Optional;->isPresent()Z
move-result v1
const/4 v2, 0x1
const/4 v3, 0x0
if-eqz v1, :cond_1
.line 3
invoke-virtual {v0}, Lcom/google/common/base/Optional;->get()Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/lang/Long;
invoke-virtual {v0}, Ljava/lang/Long;->longValue()J
move-result-wide v0
const-wide/16 v4, 0x0
cmp-long v0, v0, v4
if-nez v0, :cond_0
goto :goto_0
:cond_0
move v2, v3
:goto_0
return v2
.line 4
:cond_1
invoke-static {}, Lcom/google/common/io/Closer;->create()Lcom/google/common/io/Closer;
move-result-object v0
.line 5
:try_start_0
invoke-virtual {p0}, Lcom/google/common/io/CharSource;->openStream()Ljava/io/Reader;
move-result-object v1
invoke-virtual {v0, v1}, Lcom/google/common/io/Closer;->register(Ljava/io/Closeable;)Ljava/io/Closeable;
move-result-object v1
check-cast v1, Ljava/io/Reader;
.line 6
invoke-virtual {v1}, Ljava/io/Reader;->read()I
move-result v1
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
const/4 v4, -0x1
if-ne v1, v4, :cond_2
goto :goto_1
:cond_2
move v2, v3
.line 7
:goto_1
invoke-virtual {v0}, Lcom/google/common/io/Closer;->close()V
return v2
:catchall_0
move-exception v1
.line 8
:try_start_1
invoke-virtual {v0, v1}, Lcom/google/common/io/Closer;->rethrow(Ljava/lang/Throwable;)Ljava/lang/RuntimeException;
move-result-object v1
throw v1
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_1
:catchall_1
move-exception v1
.line 9
invoke-virtual {v0}, Lcom/google/common/io/Closer;->close()V
.line 10
throw v1
.end method
.method public length()J
.locals 3
.annotation build Lcom/google/common/annotations/Beta;
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
invoke-virtual {p0}, Lcom/google/common/io/CharSource;->lengthIfKnown()Lcom/google/common/base/Optional;
move-result-object v0
.line 2
invoke-virtual {v0}, Lcom/google/common/base/Optional;->isPresent()Z
move-result v1
if-eqz v1, :cond_0
.line 3
invoke-virtual {v0}, Lcom/google/common/base/Optional;->get()Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/lang/Long;
invoke-virtual {v0}, Ljava/lang/Long;->longValue()J
move-result-wide v0
return-wide v0
.line 4
:cond_0
invoke-static {}, Lcom/google/common/io/Closer;->create()Lcom/google/common/io/Closer;
move-result-object v0
.line 5
:try_start_0
invoke-virtual {p0}, Lcom/google/common/io/CharSource;->openStream()Ljava/io/Reader;
move-result-object v1
invoke-virtual {v0, v1}, Lcom/google/common/io/Closer;->register(Ljava/io/Closeable;)Ljava/io/Closeable;
move-result-object v1
check-cast v1, Ljava/io/Reader;
.line 6
invoke-direct {p0, v1}, Lcom/google/common/io/CharSource;->countBySkipping(Ljava/io/Reader;)J
move-result-wide v1
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 7
invoke-virtual {v0}, Lcom/google/common/io/Closer;->close()V
return-wide v1
:catchall_0
move-exception v1
.line 8
:try_start_1
invoke-virtual {v0, v1}, Lcom/google/common/io/Closer;->rethrow(Ljava/lang/Throwable;)Ljava/lang/RuntimeException;
move-result-object v1
throw v1
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_1
:catchall_1
move-exception v1
.line 9
invoke-virtual {v0}, Lcom/google/common/io/Closer;->close()V
.line 10
throw v1
.end method
.method public lengthIfKnown()Lcom/google/common/base/Optional;
.locals 1
.annotation build Lcom/google/common/annotations/Beta;
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Lcom/google/common/base/Optional<",
"Ljava/lang/Long;",
">;"
}
.end annotation
.line 1
invoke-static {}, Lcom/google/common/base/Optional;->absent()Lcom/google/common/base/Optional;
move-result-object v0
return-object v0
.end method
.method public openBufferedStream()Ljava/io/BufferedReader;
.locals 2
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
invoke-virtual {p0}, Lcom/google/common/io/CharSource;->openStream()Ljava/io/Reader;
move-result-object v0
.line 2
instance-of v1, v0, Ljava/io/BufferedReader;
if-eqz v1, :cond_0
.line 3
check-cast v0, Ljava/io/BufferedReader;
goto :goto_0
.line 4
:cond_0
new-instance v1, Ljava/io/BufferedReader;
invoke-direct {v1, v0}, Ljava/io/BufferedReader;-><init>(Ljava/io/Reader;)V
move-object v0, v1
:goto_0
return-object v0
.end method
.method public abstract openStream()Ljava/io/Reader;
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.end method
.method public read()Ljava/lang/String;
.locals 2
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
invoke-static {}, Lcom/google/common/io/Closer;->create()Lcom/google/common/io/Closer;
move-result-object v0
.line 2
:try_start_0
invoke-virtual {p0}, Lcom/google/common/io/CharSource;->openStream()Ljava/io/Reader;
move-result-object v1
invoke-virtual {v0, v1}, Lcom/google/common/io/Closer;->register(Ljava/io/Closeable;)Ljava/io/Closeable;
move-result-object v1
check-cast v1, Ljava/io/Reader;
.line 3
invoke-static {v1}, Lcom/google/common/io/CharStreams;->toString(Ljava/lang/Readable;)Ljava/lang/String;
move-result-object v1
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 4
invoke-virtual {v0}, Lcom/google/common/io/Closer;->close()V
return-object v1
:catchall_0
move-exception v1
.line 5
:try_start_1
invoke-virtual {v0, v1}, Lcom/google/common/io/Closer;->rethrow(Ljava/lang/Throwable;)Ljava/lang/RuntimeException;
move-result-object v1
throw v1
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_1
:catchall_1
move-exception v1
.line 6
invoke-virtual {v0}, Lcom/google/common/io/Closer;->close()V
.line 7
throw v1
.end method
.method public readFirstLine()Ljava/lang/String;
.locals 2
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.annotation runtime Ljavax/annotation/CheckForNull;
.end annotation
.line 1
invoke-static {}, Lcom/google/common/io/Closer;->create()Lcom/google/common/io/Closer;
move-result-object v0
.line 2
:try_start_0
invoke-virtual {p0}, Lcom/google/common/io/CharSource;->openBufferedStream()Ljava/io/BufferedReader;
move-result-object v1
invoke-virtual {v0, v1}, Lcom/google/common/io/Closer;->register(Ljava/io/Closeable;)Ljava/io/Closeable;
move-result-object v1
check-cast v1, Ljava/io/BufferedReader;
.line 3
invoke-virtual {v1}, Ljava/io/BufferedReader;->readLine()Ljava/lang/String;
move-result-object v1
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 4
invoke-virtual {v0}, Lcom/google/common/io/Closer;->close()V
return-object v1
:catchall_0
move-exception v1
.line 5
:try_start_1
invoke-virtual {v0, v1}, Lcom/google/common/io/Closer;->rethrow(Ljava/lang/Throwable;)Ljava/lang/RuntimeException;
move-result-object v1
throw v1
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_1
:catchall_1
move-exception v1
.line 6
invoke-virtual {v0}, Lcom/google/common/io/Closer;->close()V
.line 7
throw v1
.end method
.method public readLines()Lcom/google/common/collect/ImmutableList;
.locals 4
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Lcom/google/common/collect/ImmutableList<",
"Ljava/lang/String;",
">;"
}
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
invoke-static {}, Lcom/google/common/io/Closer;->create()Lcom/google/common/io/Closer;
move-result-object v0
.line 2
:try_start_0
invoke-virtual {p0}, Lcom/google/common/io/CharSource;->openBufferedStream()Ljava/io/BufferedReader;
move-result-object v1
invoke-virtual {v0, v1}, Lcom/google/common/io/Closer;->register(Ljava/io/Closeable;)Ljava/io/Closeable;
move-result-object v1
check-cast v1, Ljava/io/BufferedReader;
.line 3
invoke-static {}, Lcom/google/common/collect/Lists;->newArrayList()Ljava/util/ArrayList;
move-result-object v2
.line 4
:goto_0
invoke-virtual {v1}, Ljava/io/BufferedReader;->readLine()Ljava/lang/String;
move-result-object v3
if-eqz v3, :cond_0
.line 5
invoke-interface {v2, v3}, Ljava/util/List;->add(Ljava/lang/Object;)Z
goto :goto_0
.line 6
:cond_0
invoke-static {v2}, Lcom/google/common/collect/ImmutableList;->copyOf(Ljava/util/Collection;)Lcom/google/common/collect/ImmutableList;
move-result-object v1
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 7
invoke-virtual {v0}, Lcom/google/common/io/Closer;->close()V
return-object v1
:catchall_0
move-exception v1
.line 8
:try_start_1
invoke-virtual {v0, v1}, Lcom/google/common/io/Closer;->rethrow(Ljava/lang/Throwable;)Ljava/lang/RuntimeException;
move-result-object v1
throw v1
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_1
:catchall_1
move-exception v1
.line 9
invoke-virtual {v0}, Lcom/google/common/io/Closer;->close()V
.line 10
throw v1
.end method
.method public readLines(Lcom/google/common/io/LineProcessor;)Ljava/lang/Object;
.locals 2
.annotation build Lcom/google/common/annotations/Beta;
.end annotation
.annotation runtime Lcom/google/common/io/ParametricNullness;
.end annotation
.annotation build Lcom/google/errorprone/annotations/CanIgnoreReturnValue;
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">(",
"Lcom/google/common/io/LineProcessor<",
"TT;>;)TT;"
}
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 11
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
.line 12
invoke-static {}, Lcom/google/common/io/Closer;->create()Lcom/google/common/io/Closer;
move-result-object v0
.line 13
:try_start_0
invoke-virtual {p0}, Lcom/google/common/io/CharSource;->openStream()Ljava/io/Reader;
move-result-object v1
invoke-virtual {v0, v1}, Lcom/google/common/io/Closer;->register(Ljava/io/Closeable;)Ljava/io/Closeable;
move-result-object v1
check-cast v1, Ljava/io/Reader;
.line 14
invoke-static {v1, p1}, Lcom/google/common/io/CharStreams;->readLines(Ljava/lang/Readable;Lcom/google/common/io/LineProcessor;)Ljava/lang/Object;
move-result-object p1
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 15
invoke-virtual {v0}, Lcom/google/common/io/Closer;->close()V
return-object p1
:catchall_0
move-exception p1
.line 16
:try_start_1
invoke-virtual {v0, p1}, Lcom/google/common/io/Closer;->rethrow(Ljava/lang/Throwable;)Ljava/lang/RuntimeException;
move-result-object p1
throw p1
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_1
:catchall_1
move-exception p1
.line 17
invoke-virtual {v0}, Lcom/google/common/io/Closer;->close()V
.line 18
throw p1
.end method
@@ -0,0 +1,222 @@
.class final Lcom/google/common/io/CharStreams$NullWriter;
.super Ljava/io/Writer;
.source "CharStreams.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/google/common/io/CharStreams;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = "NullWriter"
.end annotation
# static fields
.field private static final INSTANCE:Lcom/google/common/io/CharStreams$NullWriter;
# direct methods
.method public static constructor <clinit>()V
.locals 1
.line 1
new-instance v0, Lcom/google/common/io/CharStreams$NullWriter;
invoke-direct {v0}, Lcom/google/common/io/CharStreams$NullWriter;-><init>()V
sput-object v0, Lcom/google/common/io/CharStreams$NullWriter;->INSTANCE:Lcom/google/common/io/CharStreams$NullWriter;
return-void
.end method
.method private constructor <init>()V
.locals 0
.line 1
invoke-direct {p0}, Ljava/io/Writer;-><init>()V
return-void
.end method
.method public static synthetic access$000()Lcom/google/common/io/CharStreams$NullWriter;
.locals 1
.line 1
sget-object v0, Lcom/google/common/io/CharStreams$NullWriter;->INSTANCE:Lcom/google/common/io/CharStreams$NullWriter;
return-object v0
.end method
# virtual methods
.method public append(C)Ljava/io/Writer;
.locals 0
return-object p0
.end method
.method public append(Ljava/lang/CharSequence;)Ljava/io/Writer;
.locals 0
.param p1 # Ljava/lang/CharSequence;
.annotation runtime Ljavax/annotation/CheckForNull;
.end annotation
.end param
return-object p0
.end method
.method public append(Ljava/lang/CharSequence;II)Ljava/io/Writer;
.locals 0
.param p1 # Ljava/lang/CharSequence;
.annotation runtime Ljavax/annotation/CheckForNull;
.end annotation
.end param
if-nez p1, :cond_0
const/4 p1, 0x4
goto :goto_0
.line 4
:cond_0
invoke-interface {p1}, Ljava/lang/CharSequence;->length()I
move-result p1
:goto_0
invoke-static {p2, p3, p1}, Lcom/google/common/base/Preconditions;->checkPositionIndexes(III)V
return-object p0
.end method
.method public bridge synthetic append(C)Ljava/lang/Appendable;
.locals 0
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
invoke-virtual {p0, p1}, Lcom/google/common/io/CharStreams$NullWriter;->append(C)Ljava/io/Writer;
move-result-object p1
return-object p1
.end method
.method public bridge synthetic append(Ljava/lang/CharSequence;)Ljava/lang/Appendable;
.locals 0
.param p1 # Ljava/lang/CharSequence;
.annotation runtime Ljavax/annotation/CheckForNull;
.end annotation
.end param
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 2
invoke-virtual {p0, p1}, Lcom/google/common/io/CharStreams$NullWriter;->append(Ljava/lang/CharSequence;)Ljava/io/Writer;
move-result-object p1
return-object p1
.end method
.method public bridge synthetic append(Ljava/lang/CharSequence;II)Ljava/lang/Appendable;
.locals 0
.param p1 # Ljava/lang/CharSequence;
.annotation runtime Ljavax/annotation/CheckForNull;
.end annotation
.end param
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 3
invoke-virtual {p0, p1, p2, p3}, Lcom/google/common/io/CharStreams$NullWriter;->append(Ljava/lang/CharSequence;II)Ljava/io/Writer;
move-result-object p1
return-object p1
.end method
.method public close()V
.locals 0
return-void
.end method
.method public flush()V
.locals 0
return-void
.end method
.method public toString()Ljava/lang/String;
.locals 1
const-string v0, "CharStreams.nullWriter()"
return-object v0
.end method
.method public write(I)V
.locals 0
return-void
.end method
.method public write(Ljava/lang/String;)V
.locals 0
.line 3
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
return-void
.end method
.method public write(Ljava/lang/String;II)V
.locals 0
add-int/2addr p3, p2
.line 4
invoke-virtual {p1}, Ljava/lang/String;->length()I
move-result p1
invoke-static {p2, p3, p1}, Lcom/google/common/base/Preconditions;->checkPositionIndexes(III)V
return-void
.end method
.method public write([C)V
.locals 0
.line 1
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
return-void
.end method
.method public write([CII)V
.locals 0
add-int/2addr p3, p2
.line 2
array-length p1, p1
invoke-static {p2, p3, p1}, Lcom/google/common/base/Preconditions;->checkPositionIndexes(III)V
return-void
.end method
@@ -0,0 +1,529 @@
.class public final Lcom/google/common/io/CharStreams;
.super Ljava/lang/Object;
.source "CharStreams.java"
# annotations
.annotation build Lcom/google/common/annotations/GwtIncompatible;
.end annotation
.annotation runtime Lcom/google/common/io/ElementTypesAreNonnullByDefault;
.end annotation
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/google/common/io/CharStreams$NullWriter;
}
.end annotation
# static fields
.field private static final DEFAULT_BUF_SIZE:I = 0x800
# direct methods
.method private constructor <init>()V
.locals 0
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static asWriter(Ljava/lang/Appendable;)Ljava/io/Writer;
.locals 1
.annotation build Lcom/google/common/annotations/Beta;
.end annotation
.line 1
instance-of v0, p0, Ljava/io/Writer;
if-eqz v0, :cond_0
.line 2
check-cast p0, Ljava/io/Writer;
return-object p0
.line 3
:cond_0
new-instance v0, Lcom/google/common/io/AppendableWriter;
invoke-direct {v0, p0}, Lcom/google/common/io/AppendableWriter;-><init>(Ljava/lang/Appendable;)V
return-object v0
.end method
.method public static copy(Ljava/lang/Readable;Ljava/lang/Appendable;)J
.locals 5
.annotation build Lcom/google/errorprone/annotations/CanIgnoreReturnValue;
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
instance-of v0, p0, Ljava/io/Reader;
if-eqz v0, :cond_1
.line 2
instance-of v0, p1, Ljava/lang/StringBuilder;
if-eqz v0, :cond_0
.line 3
check-cast p0, Ljava/io/Reader;
check-cast p1, Ljava/lang/StringBuilder;
invoke-static {p0, p1}, Lcom/google/common/io/CharStreams;->copyReaderToBuilder(Ljava/io/Reader;Ljava/lang/StringBuilder;)J
move-result-wide p0
return-wide p0
.line 4
:cond_0
check-cast p0, Ljava/io/Reader;
invoke-static {p1}, Lcom/google/common/io/CharStreams;->asWriter(Ljava/lang/Appendable;)Ljava/io/Writer;
move-result-object p1
invoke-static {p0, p1}, Lcom/google/common/io/CharStreams;->copyReaderToWriter(Ljava/io/Reader;Ljava/io/Writer;)J
move-result-wide p0
return-wide p0
.line 5
:cond_1
invoke-static {p0}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
.line 6
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
const-wide/16 v0, 0x0
.line 7
invoke-static {}, Lcom/google/common/io/CharStreams;->createBuffer()Ljava/nio/CharBuffer;
move-result-object v2
.line 8
:goto_0
invoke-interface {p0, v2}, Ljava/lang/Readable;->read(Ljava/nio/CharBuffer;)I
move-result v3
const/4 v4, -0x1
if-eq v3, v4, :cond_2
.line 9
invoke-static {v2}, Lcom/google/common/io/Java8Compatibility;->flip(Ljava/nio/Buffer;)V
.line 10
invoke-interface {p1, v2}, Ljava/lang/Appendable;->append(Ljava/lang/CharSequence;)Ljava/lang/Appendable;
.line 11
invoke-virtual {v2}, Ljava/nio/CharBuffer;->remaining()I
move-result v3
int-to-long v3, v3
add-long/2addr v0, v3
.line 12
invoke-static {v2}, Lcom/google/common/io/Java8Compatibility;->clear(Ljava/nio/Buffer;)V
goto :goto_0
:cond_2
return-wide v0
.end method
.method public static copyReaderToBuilder(Ljava/io/Reader;Ljava/lang/StringBuilder;)J
.locals 5
.annotation build Lcom/google/errorprone/annotations/CanIgnoreReturnValue;
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
invoke-static {p0}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
.line 2
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
const/16 v0, 0x800
new-array v0, v0, [C
const-wide/16 v1, 0x0
.line 3
:goto_0
invoke-virtual {p0, v0}, Ljava/io/Reader;->read([C)I
move-result v3
const/4 v4, -0x1
if-eq v3, v4, :cond_0
const/4 v4, 0x0
.line 4
invoke-virtual {p1, v0, v4, v3}, Ljava/lang/StringBuilder;->append([CII)Ljava/lang/StringBuilder;
int-to-long v3, v3
add-long/2addr v1, v3
goto :goto_0
:cond_0
return-wide v1
.end method
.method public static copyReaderToWriter(Ljava/io/Reader;Ljava/io/Writer;)J
.locals 5
.annotation build Lcom/google/errorprone/annotations/CanIgnoreReturnValue;
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
invoke-static {p0}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
.line 2
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
const/16 v0, 0x800
new-array v0, v0, [C
const-wide/16 v1, 0x0
.line 3
:goto_0
invoke-virtual {p0, v0}, Ljava/io/Reader;->read([C)I
move-result v3
const/4 v4, -0x1
if-eq v3, v4, :cond_0
const/4 v4, 0x0
.line 4
invoke-virtual {p1, v0, v4, v3}, Ljava/io/Writer;->write([CII)V
int-to-long v3, v3
add-long/2addr v1, v3
goto :goto_0
:cond_0
return-wide v1
.end method
.method public static createBuffer()Ljava/nio/CharBuffer;
.locals 1
const/16 v0, 0x800
.line 1
invoke-static {v0}, Ljava/nio/CharBuffer;->allocate(I)Ljava/nio/CharBuffer;
move-result-object v0
return-object v0
.end method
.method public static exhaust(Ljava/lang/Readable;)J
.locals 7
.annotation build Lcom/google/common/annotations/Beta;
.end annotation
.annotation build Lcom/google/errorprone/annotations/CanIgnoreReturnValue;
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
invoke-static {}, Lcom/google/common/io/CharStreams;->createBuffer()Ljava/nio/CharBuffer;
move-result-object v0
const-wide/16 v1, 0x0
.line 2
:goto_0
invoke-interface {p0, v0}, Ljava/lang/Readable;->read(Ljava/nio/CharBuffer;)I
move-result v3
int-to-long v3, v3
const-wide/16 v5, -0x1
cmp-long v5, v3, v5
if-eqz v5, :cond_0
add-long/2addr v1, v3
.line 3
invoke-static {v0}, Lcom/google/common/io/Java8Compatibility;->clear(Ljava/nio/Buffer;)V
goto :goto_0
:cond_0
return-wide v1
.end method
.method public static nullWriter()Ljava/io/Writer;
.locals 1
.annotation build Lcom/google/common/annotations/Beta;
.end annotation
.line 1
invoke-static {}, Lcom/google/common/io/CharStreams$NullWriter;->access$000()Lcom/google/common/io/CharStreams$NullWriter;
move-result-object v0
return-object v0
.end method
.method public static readLines(Ljava/lang/Readable;Lcom/google/common/io/LineProcessor;)Ljava/lang/Object;
.locals 1
.annotation build Lcom/google/common/annotations/Beta;
.end annotation
.annotation runtime Lcom/google/common/io/ParametricNullness;
.end annotation
.annotation build Lcom/google/errorprone/annotations/CanIgnoreReturnValue;
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">(",
"Ljava/lang/Readable;",
"Lcom/google/common/io/LineProcessor<",
"TT;>;)TT;"
}
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 5
invoke-static {p0}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
.line 6
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
.line 7
new-instance v0, Lcom/google/common/io/LineReader;
invoke-direct {v0, p0}, Lcom/google/common/io/LineReader;-><init>(Ljava/lang/Readable;)V
.line 8
:cond_0
invoke-virtual {v0}, Lcom/google/common/io/LineReader;->readLine()Ljava/lang/String;
move-result-object p0
if-eqz p0, :cond_1
.line 9
invoke-interface {p1, p0}, Lcom/google/common/io/LineProcessor;->processLine(Ljava/lang/String;)Z
move-result p0
if-nez p0, :cond_0
.line 10
:cond_1
invoke-interface {p1}, Lcom/google/common/io/LineProcessor;->getResult()Ljava/lang/Object;
move-result-object p0
return-object p0
.end method
.method public static readLines(Ljava/lang/Readable;)Ljava/util/List;
.locals 2
.annotation build Lcom/google/common/annotations/Beta;
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/Readable;",
")",
"Ljava/util/List<",
"Ljava/lang/String;",
">;"
}
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
new-instance v0, Ljava/util/ArrayList;
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
.line 2
new-instance v1, Lcom/google/common/io/LineReader;
invoke-direct {v1, p0}, Lcom/google/common/io/LineReader;-><init>(Ljava/lang/Readable;)V
.line 3
:goto_0
invoke-virtual {v1}, Lcom/google/common/io/LineReader;->readLine()Ljava/lang/String;
move-result-object p0
if-eqz p0, :cond_0
.line 4
invoke-virtual {v0, p0}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
goto :goto_0
:cond_0
return-object v0
.end method
.method public static skipFully(Ljava/io/Reader;J)V
.locals 4
.annotation build Lcom/google/common/annotations/Beta;
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
invoke-static {p0}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
:goto_0
const-wide/16 v0, 0x0
cmp-long v2, p1, v0
if-lez v2, :cond_1
.line 2
invoke-virtual {p0, p1, p2}, Ljava/io/Reader;->skip(J)J
move-result-wide v2
cmp-long v0, v2, v0
if-eqz v0, :cond_0
sub-long/2addr p1, v2
goto :goto_0
.line 3
:cond_0
new-instance p0, Ljava/io/EOFException;
invoke-direct {p0}, Ljava/io/EOFException;-><init>()V
throw p0
:cond_1
return-void
.end method
.method public static toString(Ljava/lang/Readable;)Ljava/lang/String;
.locals 0
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
invoke-static {p0}, Lcom/google/common/io/CharStreams;->toStringBuilder(Ljava/lang/Readable;)Ljava/lang/StringBuilder;
move-result-object p0
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p0
return-object p0
.end method
.method private static toStringBuilder(Ljava/lang/Readable;)Ljava/lang/StringBuilder;
.locals 2
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
.line 2
instance-of v1, p0, Ljava/io/Reader;
if-eqz v1, :cond_0
.line 3
check-cast p0, Ljava/io/Reader;
invoke-static {p0, v0}, Lcom/google/common/io/CharStreams;->copyReaderToBuilder(Ljava/io/Reader;Ljava/lang/StringBuilder;)J
goto :goto_0
.line 4
:cond_0
invoke-static {p0, v0}, Lcom/google/common/io/CharStreams;->copy(Ljava/lang/Readable;Ljava/lang/Appendable;)J
:goto_0
return-object v0
.end method
@@ -0,0 +1,154 @@
.class public final Lcom/google/common/io/Closeables;
.super Ljava/lang/Object;
.source "Closeables.java"
# annotations
.annotation build Lcom/google/common/annotations/Beta;
.end annotation
.annotation build Lcom/google/common/annotations/GwtIncompatible;
.end annotation
.annotation runtime Lcom/google/common/io/ElementTypesAreNonnullByDefault;
.end annotation
# static fields
.field public static final logger:Ljava/util/logging/Logger;
.annotation build Lcom/google/common/annotations/VisibleForTesting;
.end annotation
.end field
# direct methods
.method public static constructor <clinit>()V
.locals 1
.line 1
const-class v0, Lcom/google/common/io/Closeables;
invoke-virtual {v0}, Ljava/lang/Class;->getName()Ljava/lang/String;
move-result-object v0
invoke-static {v0}, Ljava/util/logging/Logger;->getLogger(Ljava/lang/String;)Ljava/util/logging/Logger;
move-result-object v0
sput-object v0, Lcom/google/common/io/Closeables;->logger:Ljava/util/logging/Logger;
return-void
.end method
.method private constructor <init>()V
.locals 0
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static close(Ljava/io/Closeable;Z)V
.locals 2
.param p0 # Ljava/io/Closeable;
.annotation runtime Ljavax/annotation/CheckForNull;
.end annotation
.end param
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
if-nez p0, :cond_0
return-void
.line 1
:cond_0
:try_start_0
invoke-interface {p0}, Ljava/io/Closeable;->close()V
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
goto :goto_0
:catch_0
move-exception p0
if-eqz p1, :cond_1
.line 2
sget-object p1, Lcom/google/common/io/Closeables;->logger:Ljava/util/logging/Logger;
sget-object v0, Ljava/util/logging/Level;->WARNING:Ljava/util/logging/Level;
const-string v1, "IOException thrown while closing Closeable."
invoke-virtual {p1, v0, v1, p0}, Ljava/util/logging/Logger;->log(Ljava/util/logging/Level;Ljava/lang/String;Ljava/lang/Throwable;)V
:goto_0
return-void
.line 3
:cond_1
throw p0
.end method
.method public static closeQuietly(Ljava/io/InputStream;)V
.locals 1
.param p0 # Ljava/io/InputStream;
.annotation runtime Ljavax/annotation/CheckForNull;
.end annotation
.end param
const/4 v0, 0x1
.line 1
:try_start_0
invoke-static {p0, v0}, Lcom/google/common/io/Closeables;->close(Ljava/io/Closeable;Z)V
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
return-void
:catch_0
move-exception p0
.line 2
new-instance v0, Ljava/lang/AssertionError;
invoke-direct {v0, p0}, Ljava/lang/AssertionError;-><init>(Ljava/lang/Object;)V
throw v0
.end method
.method public static closeQuietly(Ljava/io/Reader;)V
.locals 1
.param p0 # Ljava/io/Reader;
.annotation runtime Ljavax/annotation/CheckForNull;
.end annotation
.end param
const/4 v0, 0x1
.line 3
:try_start_0
invoke-static {p0, v0}, Lcom/google/common/io/Closeables;->close(Ljava/io/Closeable;Z)V
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
return-void
:catch_0
move-exception p0
.line 4
new-instance v0, Ljava/lang/AssertionError;
invoke-direct {v0, p0}, Ljava/lang/AssertionError;-><init>(Ljava/lang/Object;)V
throw v0
.end method
@@ -0,0 +1,79 @@
.class final Lcom/google/common/io/Closer$LoggingSuppressor;
.super Ljava/lang/Object;
.source "Closer.java"
# interfaces
.implements Lcom/google/common/io/Closer$Suppressor;
# annotations
.annotation build Lcom/google/common/annotations/VisibleForTesting;
.end annotation
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/google/common/io/Closer;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = "LoggingSuppressor"
.end annotation
# static fields
.field public static final INSTANCE:Lcom/google/common/io/Closer$LoggingSuppressor;
# direct methods
.method public static constructor <clinit>()V
.locals 1
.line 1
new-instance v0, Lcom/google/common/io/Closer$LoggingSuppressor;
invoke-direct {v0}, Lcom/google/common/io/Closer$LoggingSuppressor;-><init>()V
sput-object v0, Lcom/google/common/io/Closer$LoggingSuppressor;->INSTANCE:Lcom/google/common/io/Closer$LoggingSuppressor;
return-void
.end method
.method public constructor <init>()V
.locals 0
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
# virtual methods
.method public suppress(Ljava/io/Closeable;Ljava/lang/Throwable;Ljava/lang/Throwable;)V
.locals 3
.line 1
sget-object p2, Lcom/google/common/io/Closeables;->logger:Ljava/util/logging/Logger;
sget-object v0, Ljava/util/logging/Level;->WARNING:Ljava/util/logging/Level;
invoke-static {p1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
move-result-object p1
invoke-virtual {p1}, Ljava/lang/String;->length()I
move-result v1
add-int/lit8 v1, v1, 0x2a
const-string v2, "Suppressing exception thrown when closing "
invoke-static {v1, v2, p1}, Lcom/android/billingclient/api/e;->a(ILjava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object p1
invoke-virtual {p2, v0, p1, p3}, Ljava/util/logging/Logger;->log(Ljava/util/logging/Level;Ljava/lang/String;Ljava/lang/Throwable;)V
return-void
.end method
@@ -0,0 +1,116 @@
.class final Lcom/google/common/io/Closer$SuppressingSuppressor;
.super Ljava/lang/Object;
.source "Closer.java"
# interfaces
.implements Lcom/google/common/io/Closer$Suppressor;
# annotations
.annotation build Lcom/google/common/annotations/VisibleForTesting;
.end annotation
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/google/common/io/Closer;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = "SuppressingSuppressor"
.end annotation
# instance fields
.field private final addSuppressed:Ljava/lang/reflect/Method;
# direct methods
.method private constructor <init>(Ljava/lang/reflect/Method;)V
.locals 0
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 2
iput-object p1, p0, Lcom/google/common/io/Closer$SuppressingSuppressor;->addSuppressed:Ljava/lang/reflect/Method;
return-void
.end method
.method public static tryCreate()Lcom/google/common/io/Closer$SuppressingSuppressor;
.locals 5
.annotation runtime Ljavax/annotation/CheckForNull;
.end annotation
.line 1
:try_start_0
const-class v0, Ljava/lang/Throwable;
const-string v1, "addSuppressed"
const/4 v2, 0x1
new-array v2, v2, [Ljava/lang/Class;
const/4 v3, 0x0
const-class v4, Ljava/lang/Throwable;
aput-object v4, v2, v3
invoke-virtual {v0, v1, v2}, Ljava/lang/Class;->getMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
move-result-object v0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 2
new-instance v1, Lcom/google/common/io/Closer$SuppressingSuppressor;
invoke-direct {v1, v0}, Lcom/google/common/io/Closer$SuppressingSuppressor;-><init>(Ljava/lang/reflect/Method;)V
return-object v1
:catchall_0
const/4 v0, 0x0
return-object v0
.end method
# virtual methods
.method public suppress(Ljava/io/Closeable;Ljava/lang/Throwable;Ljava/lang/Throwable;)V
.locals 3
if-ne p2, p3, :cond_0
return-void
.line 1
:cond_0
:try_start_0
iget-object v0, p0, Lcom/google/common/io/Closer$SuppressingSuppressor;->addSuppressed:Ljava/lang/reflect/Method;
const/4 v1, 0x1
new-array v1, v1, [Ljava/lang/Object;
const/4 v2, 0x0
aput-object p3, v1, v2
invoke-virtual {v0, p2, v1}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
goto :goto_0
.line 2
:catchall_0
sget-object v0, Lcom/google/common/io/Closer$LoggingSuppressor;->INSTANCE:Lcom/google/common/io/Closer$LoggingSuppressor;
invoke-virtual {v0, p1, p2, p3}, Lcom/google/common/io/Closer$LoggingSuppressor;->suppress(Ljava/io/Closeable;Ljava/lang/Throwable;Ljava/lang/Throwable;)V
:goto_0
return-void
.end method
@@ -0,0 +1,22 @@
.class interface abstract Lcom/google/common/io/Closer$Suppressor;
.super Ljava/lang/Object;
.source "Closer.java"
# annotations
.annotation build Lcom/google/common/annotations/VisibleForTesting;
.end annotation
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/google/common/io/Closer;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x609
name = "Suppressor"
.end annotation
# virtual methods
.method public abstract suppress(Ljava/io/Closeable;Ljava/lang/Throwable;Ljava/lang/Throwable;)V
.end method
@@ -0,0 +1,354 @@
.class public final Lcom/google/common/io/Closer;
.super Ljava/lang/Object;
.source "Closer.java"
# interfaces
.implements Ljava/io/Closeable;
# annotations
.annotation build Lcom/google/common/annotations/Beta;
.end annotation
.annotation build Lcom/google/common/annotations/GwtIncompatible;
.end annotation
.annotation runtime Lcom/google/common/io/ElementTypesAreNonnullByDefault;
.end annotation
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/google/common/io/Closer$SuppressingSuppressor;,
Lcom/google/common/io/Closer$LoggingSuppressor;,
Lcom/google/common/io/Closer$Suppressor;
}
.end annotation
# static fields
.field private static final SUPPRESSOR:Lcom/google/common/io/Closer$Suppressor;
# instance fields
.field private final stack:Ljava/util/Deque;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/Deque<",
"Ljava/io/Closeable;",
">;"
}
.end annotation
.end field
.field public final suppressor:Lcom/google/common/io/Closer$Suppressor;
.annotation build Lcom/google/common/annotations/VisibleForTesting;
.end annotation
.end field
.field private thrown:Ljava/lang/Throwable;
.annotation runtime Ljavax/annotation/CheckForNull;
.end annotation
.end field
# direct methods
.method public static constructor <clinit>()V
.locals 1
.line 1
invoke-static {}, Lcom/google/common/io/Closer$SuppressingSuppressor;->tryCreate()Lcom/google/common/io/Closer$SuppressingSuppressor;
move-result-object v0
if-nez v0, :cond_0
.line 2
sget-object v0, Lcom/google/common/io/Closer$LoggingSuppressor;->INSTANCE:Lcom/google/common/io/Closer$LoggingSuppressor;
:cond_0
sput-object v0, Lcom/google/common/io/Closer;->SUPPRESSOR:Lcom/google/common/io/Closer$Suppressor;
return-void
.end method
.method public constructor <init>(Lcom/google/common/io/Closer$Suppressor;)V
.locals 2
.annotation build Lcom/google/common/annotations/VisibleForTesting;
.end annotation
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 2
new-instance v0, Ljava/util/ArrayDeque;
const/4 v1, 0x4
invoke-direct {v0, v1}, Ljava/util/ArrayDeque;-><init>(I)V
iput-object v0, p0, Lcom/google/common/io/Closer;->stack:Ljava/util/Deque;
.line 3
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p1
check-cast p1, Lcom/google/common/io/Closer$Suppressor;
iput-object p1, p0, Lcom/google/common/io/Closer;->suppressor:Lcom/google/common/io/Closer$Suppressor;
return-void
.end method
.method public static create()Lcom/google/common/io/Closer;
.locals 2
.line 1
new-instance v0, Lcom/google/common/io/Closer;
sget-object v1, Lcom/google/common/io/Closer;->SUPPRESSOR:Lcom/google/common/io/Closer$Suppressor;
invoke-direct {v0, v1}, Lcom/google/common/io/Closer;-><init>(Lcom/google/common/io/Closer$Suppressor;)V
return-object v0
.end method
# virtual methods
.method public close()V
.locals 4
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
iget-object v0, p0, Lcom/google/common/io/Closer;->thrown:Ljava/lang/Throwable;
.line 2
:goto_0
iget-object v1, p0, Lcom/google/common/io/Closer;->stack:Ljava/util/Deque;
invoke-interface {v1}, Ljava/util/Deque;->isEmpty()Z
move-result v1
if-nez v1, :cond_1
.line 3
iget-object v1, p0, Lcom/google/common/io/Closer;->stack:Ljava/util/Deque;
invoke-interface {v1}, Ljava/util/Deque;->removeFirst()Ljava/lang/Object;
move-result-object v1
check-cast v1, Ljava/io/Closeable;
.line 4
:try_start_0
invoke-interface {v1}, Ljava/io/Closeable;->close()V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
goto :goto_0
:catchall_0
move-exception v2
if-nez v0, :cond_0
move-object v0, v2
goto :goto_0
.line 5
:cond_0
iget-object v3, p0, Lcom/google/common/io/Closer;->suppressor:Lcom/google/common/io/Closer$Suppressor;
invoke-interface {v3, v1, v0, v2}, Lcom/google/common/io/Closer$Suppressor;->suppress(Ljava/io/Closeable;Ljava/lang/Throwable;Ljava/lang/Throwable;)V
goto :goto_0
.line 6
:cond_1
iget-object v1, p0, Lcom/google/common/io/Closer;->thrown:Ljava/lang/Throwable;
if-nez v1, :cond_3
if-nez v0, :cond_2
goto :goto_1
.line 7
:cond_2
const-class v1, Ljava/io/IOException;
invoke-static {v0, v1}, Lcom/google/common/base/Throwables;->propagateIfPossible(Ljava/lang/Throwable;Ljava/lang/Class;)V
.line 8
new-instance v1, Ljava/lang/AssertionError;
invoke-direct {v1, v0}, Ljava/lang/AssertionError;-><init>(Ljava/lang/Object;)V
throw v1
:cond_3
:goto_1
return-void
.end method
.method public register(Ljava/io/Closeable;)Ljava/io/Closeable;
.locals 1
.param p1 # Ljava/io/Closeable;
.annotation runtime Lcom/google/common/io/ParametricNullness;
.end annotation
.end param
.annotation runtime Lcom/google/common/io/ParametricNullness;
.end annotation
.annotation build Lcom/google/errorprone/annotations/CanIgnoreReturnValue;
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"<C::",
"Ljava/io/Closeable;",
">(TC;)TC;"
}
.end annotation
if-eqz p1, :cond_0
.line 1
iget-object v0, p0, Lcom/google/common/io/Closer;->stack:Ljava/util/Deque;
invoke-interface {v0, p1}, Ljava/util/Deque;->addFirst(Ljava/lang/Object;)V
:cond_0
return-object p1
.end method
.method public rethrow(Ljava/lang/Throwable;)Ljava/lang/RuntimeException;
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
.line 2
iput-object p1, p0, Lcom/google/common/io/Closer;->thrown:Ljava/lang/Throwable;
.line 3
const-class v0, Ljava/io/IOException;
invoke-static {p1, v0}, Lcom/google/common/base/Throwables;->propagateIfPossible(Ljava/lang/Throwable;Ljava/lang/Class;)V
.line 4
new-instance v0, Ljava/lang/RuntimeException;
invoke-direct {v0, p1}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/Throwable;)V
throw v0
.end method
.method public rethrow(Ljava/lang/Throwable;Ljava/lang/Class;)Ljava/lang/RuntimeException;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"<X:",
"Ljava/lang/Exception;",
">(",
"Ljava/lang/Throwable;",
"Ljava/lang/Class<",
"TX;>;)",
"Ljava/lang/RuntimeException;",
"^",
"Ljava/io/IOException;",
"^TX;"
}
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;,
Ljava/lang/Exception;
}
.end annotation
.line 5
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
.line 6
iput-object p1, p0, Lcom/google/common/io/Closer;->thrown:Ljava/lang/Throwable;
.line 7
const-class v0, Ljava/io/IOException;
invoke-static {p1, v0}, Lcom/google/common/base/Throwables;->propagateIfPossible(Ljava/lang/Throwable;Ljava/lang/Class;)V
.line 8
invoke-static {p1, p2}, Lcom/google/common/base/Throwables;->propagateIfPossible(Ljava/lang/Throwable;Ljava/lang/Class;)V
.line 9
new-instance p2, Ljava/lang/RuntimeException;
invoke-direct {p2, p1}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/Throwable;)V
throw p2
.end method
.method public rethrow(Ljava/lang/Throwable;Ljava/lang/Class;Ljava/lang/Class;)Ljava/lang/RuntimeException;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"<X1:",
"Ljava/lang/Exception;",
"X2:",
"Ljava/lang/Exception;",
">(",
"Ljava/lang/Throwable;",
"Ljava/lang/Class<",
"TX1;>;",
"Ljava/lang/Class<",
"TX2;>;)",
"Ljava/lang/RuntimeException;",
"^",
"Ljava/io/IOException;",
"^TX1;^TX2;"
}
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;,
Ljava/lang/Exception;,
Ljava/lang/Exception;
}
.end annotation
.line 10
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
.line 11
iput-object p1, p0, Lcom/google/common/io/Closer;->thrown:Ljava/lang/Throwable;
.line 12
const-class v0, Ljava/io/IOException;
invoke-static {p1, v0}, Lcom/google/common/base/Throwables;->propagateIfPossible(Ljava/lang/Throwable;Ljava/lang/Class;)V
.line 13
invoke-static {p1, p2, p3}, Lcom/google/common/base/Throwables;->propagateIfPossible(Ljava/lang/Throwable;Ljava/lang/Class;Ljava/lang/Class;)V
.line 14
new-instance p2, Ljava/lang/RuntimeException;
invoke-direct {p2, p1}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/Throwable;)V
throw p2
.end method
@@ -0,0 +1,250 @@
.class public final Lcom/google/common/io/CountingInputStream;
.super Ljava/io/FilterInputStream;
.source "CountingInputStream.java"
# annotations
.annotation build Lcom/google/common/annotations/Beta;
.end annotation
.annotation build Lcom/google/common/annotations/GwtIncompatible;
.end annotation
.annotation runtime Lcom/google/common/io/ElementTypesAreNonnullByDefault;
.end annotation
# instance fields
.field private count:J
.field private mark:J
# direct methods
.method public constructor <init>(Ljava/io/InputStream;)V
.locals 2
.line 1
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p1
check-cast p1, Ljava/io/InputStream;
invoke-direct {p0, p1}, Ljava/io/FilterInputStream;-><init>(Ljava/io/InputStream;)V
const-wide/16 v0, -0x1
.line 2
iput-wide v0, p0, Lcom/google/common/io/CountingInputStream;->mark:J
return-void
.end method
# virtual methods
.method public getCount()J
.locals 2
.line 1
iget-wide v0, p0, Lcom/google/common/io/CountingInputStream;->count:J
return-wide v0
.end method
.method public declared-synchronized mark(I)V
.locals 2
monitor-enter p0
.line 1
:try_start_0
iget-object v0, p0, Ljava/io/FilterInputStream;->in:Ljava/io/InputStream;
invoke-virtual {v0, p1}, Ljava/io/InputStream;->mark(I)V
.line 2
iget-wide v0, p0, Lcom/google/common/io/CountingInputStream;->count:J
iput-wide v0, p0, Lcom/google/common/io/CountingInputStream;->mark:J
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 3
monitor-exit p0
return-void
:catchall_0
move-exception p1
monitor-exit p0
throw p1
.end method
.method public read()I
.locals 5
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
iget-object v0, p0, Ljava/io/FilterInputStream;->in:Ljava/io/InputStream;
invoke-virtual {v0}, Ljava/io/InputStream;->read()I
move-result v0
const/4 v1, -0x1
if-eq v0, v1, :cond_0
.line 2
iget-wide v1, p0, Lcom/google/common/io/CountingInputStream;->count:J
const-wide/16 v3, 0x1
add-long/2addr v1, v3
iput-wide v1, p0, Lcom/google/common/io/CountingInputStream;->count:J
:cond_0
return v0
.end method
.method public read([BII)I
.locals 2
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 3
iget-object v0, p0, Ljava/io/FilterInputStream;->in:Ljava/io/InputStream;
invoke-virtual {v0, p1, p2, p3}, Ljava/io/InputStream;->read([BII)I
move-result p1
const/4 p2, -0x1
if-eq p1, p2, :cond_0
.line 4
iget-wide p2, p0, Lcom/google/common/io/CountingInputStream;->count:J
int-to-long v0, p1
add-long/2addr p2, v0
iput-wide p2, p0, Lcom/google/common/io/CountingInputStream;->count:J
:cond_0
return p1
.end method
.method public declared-synchronized reset()V
.locals 4
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
monitor-enter p0
.line 1
:try_start_0
iget-object v0, p0, Ljava/io/FilterInputStream;->in:Ljava/io/InputStream;
invoke-virtual {v0}, Ljava/io/InputStream;->markSupported()Z
move-result v0
if-eqz v0, :cond_1
.line 2
iget-wide v0, p0, Lcom/google/common/io/CountingInputStream;->mark:J
const-wide/16 v2, -0x1
cmp-long v0, v0, v2
if-eqz v0, :cond_0
.line 3
iget-object v0, p0, Ljava/io/FilterInputStream;->in:Ljava/io/InputStream;
invoke-virtual {v0}, Ljava/io/InputStream;->reset()V
.line 4
iget-wide v0, p0, Lcom/google/common/io/CountingInputStream;->mark:J
iput-wide v0, p0, Lcom/google/common/io/CountingInputStream;->count:J
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 5
monitor-exit p0
return-void
.line 6
:cond_0
:try_start_1
new-instance v0, Ljava/io/IOException;
const-string v1, "Mark not set"
invoke-direct {v0, v1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
throw v0
.line 7
:cond_1
new-instance v0, Ljava/io/IOException;
const-string v1, "Mark not supported"
invoke-direct {v0, v1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
throw v0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
:catchall_0
move-exception v0
monitor-exit p0
throw v0
.end method
.method public skip(J)J
.locals 2
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
iget-object v0, p0, Ljava/io/FilterInputStream;->in:Ljava/io/InputStream;
invoke-virtual {v0, p1, p2}, Ljava/io/InputStream;->skip(J)J
move-result-wide p1
.line 2
iget-wide v0, p0, Lcom/google/common/io/CountingInputStream;->count:J
add-long/2addr v0, p1
iput-wide v0, p0, Lcom/google/common/io/CountingInputStream;->count:J
return-wide p1
.end method
@@ -0,0 +1,109 @@
.class public final Lcom/google/common/io/CountingOutputStream;
.super Ljava/io/FilterOutputStream;
.source "CountingOutputStream.java"
# annotations
.annotation build Lcom/google/common/annotations/GwtIncompatible;
.end annotation
.annotation runtime Lcom/google/common/io/ElementTypesAreNonnullByDefault;
.end annotation
# instance fields
.field private count:J
# direct methods
.method public constructor <init>(Ljava/io/OutputStream;)V
.locals 0
.line 1
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p1
check-cast p1, Ljava/io/OutputStream;
invoke-direct {p0, p1}, Ljava/io/FilterOutputStream;-><init>(Ljava/io/OutputStream;)V
return-void
.end method
# virtual methods
.method public close()V
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
iget-object v0, p0, Ljava/io/FilterOutputStream;->out:Ljava/io/OutputStream;
invoke-virtual {v0}, Ljava/io/OutputStream;->close()V
return-void
.end method
.method public getCount()J
.locals 2
.line 1
iget-wide v0, p0, Lcom/google/common/io/CountingOutputStream;->count:J
return-wide v0
.end method
.method public write(I)V
.locals 4
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 3
iget-object v0, p0, Ljava/io/FilterOutputStream;->out:Ljava/io/OutputStream;
invoke-virtual {v0, p1}, Ljava/io/OutputStream;->write(I)V
.line 4
iget-wide v0, p0, Lcom/google/common/io/CountingOutputStream;->count:J
const-wide/16 v2, 0x1
add-long/2addr v0, v2
iput-wide v0, p0, Lcom/google/common/io/CountingOutputStream;->count:J
return-void
.end method
.method public write([BII)V
.locals 2
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
iget-object v0, p0, Ljava/io/FilterOutputStream;->out:Ljava/io/OutputStream;
invoke-virtual {v0, p1, p2, p3}, Ljava/io/OutputStream;->write([BII)V
.line 2
iget-wide p1, p0, Lcom/google/common/io/CountingOutputStream;->count:J
int-to-long v0, p3
add-long/2addr p1, v0
iput-wide p1, p0, Lcom/google/common/io/CountingOutputStream;->count:J
return-void
.end method
@@ -0,0 +1,32 @@
.class interface abstract annotation Lcom/google/common/io/ElementTypesAreNonnullByDefault;
.super Ljava/lang/Object;
.source "ElementTypesAreNonnullByDefault.java"
# interfaces
.implements Ljava/lang/annotation/Annotation;
# annotations
.annotation build Lcom/google/common/annotations/GwtCompatible;
.end annotation
.annotation runtime Ljava/lang/annotation/Retention;
value = .enum Ljava/lang/annotation/RetentionPolicy;->RUNTIME:Ljava/lang/annotation/RetentionPolicy;
.end annotation
.annotation runtime Ljava/lang/annotation/Target;
value = {
.enum Ljava/lang/annotation/ElementType;->TYPE:Ljava/lang/annotation/ElementType;
}
.end annotation
.annotation runtime Ljavax/annotation/Nonnull;
.end annotation
.annotation runtime Ljavax/annotation/meta/TypeQualifierDefault;
value = {
.enum Ljava/lang/annotation/ElementType;->FIELD:Ljava/lang/annotation/ElementType;,
.enum Ljava/lang/annotation/ElementType;->METHOD:Ljava/lang/annotation/ElementType;,
.enum Ljava/lang/annotation/ElementType;->PARAMETER:Ljava/lang/annotation/ElementType;
}
.end annotation
@@ -0,0 +1,76 @@
.class Lcom/google/common/io/FileBackedOutputStream$1;
.super Lcom/google/common/io/ByteSource;
.source "FileBackedOutputStream.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
value = Lcom/google/common/io/FileBackedOutputStream;-><init>(IZLjava/io/File;)V
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1
name = null
.end annotation
# instance fields
.field public final synthetic this$0:Lcom/google/common/io/FileBackedOutputStream;
# direct methods
.method public constructor <init>(Lcom/google/common/io/FileBackedOutputStream;)V
.locals 0
.line 1
iput-object p1, p0, Lcom/google/common/io/FileBackedOutputStream$1;->this$0:Lcom/google/common/io/FileBackedOutputStream;
invoke-direct {p0}, Lcom/google/common/io/ByteSource;-><init>()V
return-void
.end method
# virtual methods
.method public finalize()V
.locals 2
.line 1
:try_start_0
iget-object v0, p0, Lcom/google/common/io/FileBackedOutputStream$1;->this$0:Lcom/google/common/io/FileBackedOutputStream;
invoke-virtual {v0}, Lcom/google/common/io/FileBackedOutputStream;->reset()V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
goto :goto_0
:catchall_0
move-exception v0
.line 2
sget-object v1, Ljava/lang/System;->err:Ljava/io/PrintStream;
invoke-virtual {v0, v1}, Ljava/lang/Throwable;->printStackTrace(Ljava/io/PrintStream;)V
:goto_0
return-void
.end method
.method public openStream()Ljava/io/InputStream;
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
iget-object v0, p0, Lcom/google/common/io/FileBackedOutputStream$1;->this$0:Lcom/google/common/io/FileBackedOutputStream;
invoke-static {v0}, Lcom/google/common/io/FileBackedOutputStream;->access$100(Lcom/google/common/io/FileBackedOutputStream;)Ljava/io/InputStream;
move-result-object v0
return-object v0
.end method
@@ -0,0 +1,51 @@
.class Lcom/google/common/io/FileBackedOutputStream$2;
.super Lcom/google/common/io/ByteSource;
.source "FileBackedOutputStream.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
value = Lcom/google/common/io/FileBackedOutputStream;-><init>(IZLjava/io/File;)V
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1
name = null
.end annotation
# instance fields
.field public final synthetic this$0:Lcom/google/common/io/FileBackedOutputStream;
# direct methods
.method public constructor <init>(Lcom/google/common/io/FileBackedOutputStream;)V
.locals 0
.line 1
iput-object p1, p0, Lcom/google/common/io/FileBackedOutputStream$2;->this$0:Lcom/google/common/io/FileBackedOutputStream;
invoke-direct {p0}, Lcom/google/common/io/ByteSource;-><init>()V
return-void
.end method
# virtual methods
.method public openStream()Ljava/io/InputStream;
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
iget-object v0, p0, Lcom/google/common/io/FileBackedOutputStream$2;->this$0:Lcom/google/common/io/FileBackedOutputStream;
invoke-static {v0}, Lcom/google/common/io/FileBackedOutputStream;->access$100(Lcom/google/common/io/FileBackedOutputStream;)Ljava/io/InputStream;
move-result-object v0
return-object v0
.end method
@@ -0,0 +1,54 @@
.class Lcom/google/common/io/FileBackedOutputStream$MemoryOutput;
.super Ljava/io/ByteArrayOutputStream;
.source "FileBackedOutputStream.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/google/common/io/FileBackedOutputStream;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x9
name = "MemoryOutput"
.end annotation
# direct methods
.method private constructor <init>()V
.locals 0
.line 1
invoke-direct {p0}, Ljava/io/ByteArrayOutputStream;-><init>()V
return-void
.end method
.method public synthetic constructor <init>(Lcom/google/common/io/FileBackedOutputStream$1;)V
.locals 0
.line 2
invoke-direct {p0}, Lcom/google/common/io/FileBackedOutputStream$MemoryOutput;-><init>()V
return-void
.end method
# virtual methods
.method public getBuffer()[B
.locals 1
.line 1
iget-object v0, p0, Ljava/io/ByteArrayOutputStream;->buf:[B
return-object v0
.end method
.method public getCount()I
.locals 1
.line 1
iget v0, p0, Ljava/io/ByteArrayOutputStream;->count:I
return v0
.end method
@@ -0,0 +1,718 @@
.class public final Lcom/google/common/io/FileBackedOutputStream;
.super Ljava/io/OutputStream;
.source "FileBackedOutputStream.java"
# annotations
.annotation build Lcom/google/common/annotations/Beta;
.end annotation
.annotation build Lcom/google/common/annotations/GwtIncompatible;
.end annotation
.annotation runtime Lcom/google/common/io/ElementTypesAreNonnullByDefault;
.end annotation
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/google/common/io/FileBackedOutputStream$MemoryOutput;
}
.end annotation
# instance fields
.field private file:Ljava/io/File;
.annotation build Lcom/google/errorprone/annotations/concurrent/GuardedBy;
value = "this"
.end annotation
.annotation runtime Ljavax/annotation/CheckForNull;
.end annotation
.end field
.field private final fileThreshold:I
.field private memory:Lcom/google/common/io/FileBackedOutputStream$MemoryOutput;
.annotation build Lcom/google/errorprone/annotations/concurrent/GuardedBy;
value = "this"
.end annotation
.annotation runtime Ljavax/annotation/CheckForNull;
.end annotation
.end field
.field private out:Ljava/io/OutputStream;
.annotation build Lcom/google/errorprone/annotations/concurrent/GuardedBy;
value = "this"
.end annotation
.end field
.field private final parentDirectory:Ljava/io/File;
.annotation runtime Ljavax/annotation/CheckForNull;
.end annotation
.end field
.field private final resetOnFinalize:Z
.field private final source:Lcom/google/common/io/ByteSource;
# direct methods
.method public constructor <init>(I)V
.locals 1
const/4 v0, 0x0
.line 1
invoke-direct {p0, p1, v0}, Lcom/google/common/io/FileBackedOutputStream;-><init>(IZ)V
return-void
.end method
.method public constructor <init>(IZ)V
.locals 1
const/4 v0, 0x0
.line 2
invoke-direct {p0, p1, p2, v0}, Lcom/google/common/io/FileBackedOutputStream;-><init>(IZLjava/io/File;)V
return-void
.end method
.method private constructor <init>(IZLjava/io/File;)V
.locals 0
.param p3 # Ljava/io/File;
.annotation runtime Ljavax/annotation/CheckForNull;
.end annotation
.end param
.line 3
invoke-direct {p0}, Ljava/io/OutputStream;-><init>()V
.line 4
iput p1, p0, Lcom/google/common/io/FileBackedOutputStream;->fileThreshold:I
.line 5
iput-boolean p2, p0, Lcom/google/common/io/FileBackedOutputStream;->resetOnFinalize:Z
.line 6
iput-object p3, p0, Lcom/google/common/io/FileBackedOutputStream;->parentDirectory:Ljava/io/File;
.line 7
new-instance p1, Lcom/google/common/io/FileBackedOutputStream$MemoryOutput;
const/4 p3, 0x0
invoke-direct {p1, p3}, Lcom/google/common/io/FileBackedOutputStream$MemoryOutput;-><init>(Lcom/google/common/io/FileBackedOutputStream$1;)V
iput-object p1, p0, Lcom/google/common/io/FileBackedOutputStream;->memory:Lcom/google/common/io/FileBackedOutputStream$MemoryOutput;
.line 8
iput-object p1, p0, Lcom/google/common/io/FileBackedOutputStream;->out:Ljava/io/OutputStream;
if-eqz p2, :cond_0
.line 9
new-instance p1, Lcom/google/common/io/FileBackedOutputStream$1;
invoke-direct {p1, p0}, Lcom/google/common/io/FileBackedOutputStream$1;-><init>(Lcom/google/common/io/FileBackedOutputStream;)V
iput-object p1, p0, Lcom/google/common/io/FileBackedOutputStream;->source:Lcom/google/common/io/ByteSource;
goto :goto_0
.line 10
:cond_0
new-instance p1, Lcom/google/common/io/FileBackedOutputStream$2;
invoke-direct {p1, p0}, Lcom/google/common/io/FileBackedOutputStream$2;-><init>(Lcom/google/common/io/FileBackedOutputStream;)V
iput-object p1, p0, Lcom/google/common/io/FileBackedOutputStream;->source:Lcom/google/common/io/ByteSource;
:goto_0
return-void
.end method
.method public static synthetic access$100(Lcom/google/common/io/FileBackedOutputStream;)Ljava/io/InputStream;
.locals 0
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
invoke-direct {p0}, Lcom/google/common/io/FileBackedOutputStream;->openInputStream()Ljava/io/InputStream;
move-result-object p0
return-object p0
.end method
.method private declared-synchronized openInputStream()Ljava/io/InputStream;
.locals 4
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
monitor-enter p0
.line 1
:try_start_0
iget-object v0, p0, Lcom/google/common/io/FileBackedOutputStream;->file:Ljava/io/File;
if-eqz v0, :cond_0
.line 2
new-instance v0, Ljava/io/FileInputStream;
iget-object v1, p0, Lcom/google/common/io/FileBackedOutputStream;->file:Ljava/io/File;
invoke-direct {v0, v1}, Ljava/io/FileInputStream;-><init>(Ljava/io/File;)V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
monitor-exit p0
return-object v0
.line 3
:cond_0
:try_start_1
iget-object v0, p0, Lcom/google/common/io/FileBackedOutputStream;->memory:Lcom/google/common/io/FileBackedOutputStream$MemoryOutput;
invoke-static {v0}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;)Ljava/lang/Object;
.line 4
new-instance v0, Ljava/io/ByteArrayInputStream;
iget-object v1, p0, Lcom/google/common/io/FileBackedOutputStream;->memory:Lcom/google/common/io/FileBackedOutputStream$MemoryOutput;
invoke-virtual {v1}, Lcom/google/common/io/FileBackedOutputStream$MemoryOutput;->getBuffer()[B
move-result-object v1
const/4 v2, 0x0
iget-object v3, p0, Lcom/google/common/io/FileBackedOutputStream;->memory:Lcom/google/common/io/FileBackedOutputStream$MemoryOutput;
invoke-virtual {v3}, Lcom/google/common/io/FileBackedOutputStream$MemoryOutput;->getCount()I
move-result v3
invoke-direct {v0, v1, v2, v3}, Ljava/io/ByteArrayInputStream;-><init>([BII)V
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
monitor-exit p0
return-object v0
:catchall_0
move-exception v0
monitor-exit p0
throw v0
.end method
.method private update(I)V
.locals 5
.annotation build Lcom/google/errorprone/annotations/concurrent/GuardedBy;
value = "this"
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
iget-object v0, p0, Lcom/google/common/io/FileBackedOutputStream;->memory:Lcom/google/common/io/FileBackedOutputStream$MemoryOutput;
if-eqz v0, :cond_1
invoke-virtual {v0}, Lcom/google/common/io/FileBackedOutputStream$MemoryOutput;->getCount()I
move-result v0
add-int/2addr v0, p1
iget p1, p0, Lcom/google/common/io/FileBackedOutputStream;->fileThreshold:I
if-le v0, p1, :cond_1
.line 2
iget-object p1, p0, Lcom/google/common/io/FileBackedOutputStream;->parentDirectory:Ljava/io/File;
const-string v0, "FileBackedOutputStream"
const/4 v1, 0x0
invoke-static {v0, v1, p1}, Ljava/io/File;->createTempFile(Ljava/lang/String;Ljava/lang/String;Ljava/io/File;)Ljava/io/File;
move-result-object p1
.line 3
iget-boolean v0, p0, Lcom/google/common/io/FileBackedOutputStream;->resetOnFinalize:Z
if-eqz v0, :cond_0
.line 4
invoke-virtual {p1}, Ljava/io/File;->deleteOnExit()V
.line 5
:cond_0
:try_start_0
new-instance v0, Ljava/io/FileOutputStream;
invoke-direct {v0, p1}, Ljava/io/FileOutputStream;-><init>(Ljava/io/File;)V
.line 6
iget-object v2, p0, Lcom/google/common/io/FileBackedOutputStream;->memory:Lcom/google/common/io/FileBackedOutputStream$MemoryOutput;
invoke-virtual {v2}, Lcom/google/common/io/FileBackedOutputStream$MemoryOutput;->getBuffer()[B
move-result-object v2
const/4 v3, 0x0
iget-object v4, p0, Lcom/google/common/io/FileBackedOutputStream;->memory:Lcom/google/common/io/FileBackedOutputStream$MemoryOutput;
invoke-virtual {v4}, Lcom/google/common/io/FileBackedOutputStream$MemoryOutput;->getCount()I
move-result v4
invoke-virtual {v0, v2, v3, v4}, Ljava/io/FileOutputStream;->write([BII)V
.line 7
invoke-virtual {v0}, Ljava/io/FileOutputStream;->flush()V
.line 8
iput-object v0, p0, Lcom/google/common/io/FileBackedOutputStream;->out:Ljava/io/OutputStream;
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
.line 9
iput-object p1, p0, Lcom/google/common/io/FileBackedOutputStream;->file:Ljava/io/File;
.line 10
iput-object v1, p0, Lcom/google/common/io/FileBackedOutputStream;->memory:Lcom/google/common/io/FileBackedOutputStream$MemoryOutput;
goto :goto_0
:catch_0
move-exception v0
.line 11
invoke-virtual {p1}, Ljava/io/File;->delete()Z
.line 12
throw v0
:cond_1
:goto_0
return-void
.end method
# virtual methods
.method public asByteSource()Lcom/google/common/io/ByteSource;
.locals 1
.line 1
iget-object v0, p0, Lcom/google/common/io/FileBackedOutputStream;->source:Lcom/google/common/io/ByteSource;
return-object v0
.end method
.method public declared-synchronized close()V
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
monitor-enter p0
.line 1
:try_start_0
iget-object v0, p0, Lcom/google/common/io/FileBackedOutputStream;->out:Ljava/io/OutputStream;
invoke-virtual {v0}, Ljava/io/OutputStream;->close()V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 2
monitor-exit p0
return-void
:catchall_0
move-exception v0
monitor-exit p0
throw v0
.end method
.method public declared-synchronized flush()V
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
monitor-enter p0
.line 1
:try_start_0
iget-object v0, p0, Lcom/google/common/io/FileBackedOutputStream;->out:Ljava/io/OutputStream;
invoke-virtual {v0}, Ljava/io/OutputStream;->flush()V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 2
monitor-exit p0
return-void
:catchall_0
move-exception v0
monitor-exit p0
throw v0
.end method
.method public declared-synchronized getFile()Ljava/io/File;
.locals 1
.annotation build Lcom/google/common/annotations/VisibleForTesting;
.end annotation
.annotation runtime Ljavax/annotation/CheckForNull;
.end annotation
monitor-enter p0
.line 1
:try_start_0
iget-object v0, p0, Lcom/google/common/io/FileBackedOutputStream;->file:Ljava/io/File;
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
monitor-exit p0
return-object v0
:catchall_0
move-exception v0
monitor-exit p0
throw v0
.end method
.method public declared-synchronized reset()V
.locals 4
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
monitor-enter p0
const/4 v0, 0x0
.line 1
:try_start_0
invoke-virtual {p0}, Lcom/google/common/io/FileBackedOutputStream;->close()V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_1
.line 2
:try_start_1
iget-object v1, p0, Lcom/google/common/io/FileBackedOutputStream;->memory:Lcom/google/common/io/FileBackedOutputStream$MemoryOutput;
if-nez v1, :cond_0
.line 3
new-instance v1, Lcom/google/common/io/FileBackedOutputStream$MemoryOutput;
invoke-direct {v1, v0}, Lcom/google/common/io/FileBackedOutputStream$MemoryOutput;-><init>(Lcom/google/common/io/FileBackedOutputStream$1;)V
iput-object v1, p0, Lcom/google/common/io/FileBackedOutputStream;->memory:Lcom/google/common/io/FileBackedOutputStream$MemoryOutput;
goto :goto_0
.line 4
:cond_0
invoke-virtual {v1}, Ljava/io/ByteArrayOutputStream;->reset()V
.line 5
:goto_0
iget-object v1, p0, Lcom/google/common/io/FileBackedOutputStream;->memory:Lcom/google/common/io/FileBackedOutputStream$MemoryOutput;
iput-object v1, p0, Lcom/google/common/io/FileBackedOutputStream;->out:Ljava/io/OutputStream;
.line 6
iget-object v1, p0, Lcom/google/common/io/FileBackedOutputStream;->file:Ljava/io/File;
if-eqz v1, :cond_2
.line 7
iput-object v0, p0, Lcom/google/common/io/FileBackedOutputStream;->file:Ljava/io/File;
.line 8
invoke-virtual {v1}, Ljava/io/File;->delete()Z
move-result v0
if-eqz v0, :cond_1
goto :goto_1
.line 9
:cond_1
new-instance v0, Ljava/io/IOException;
invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/String;->length()I
move-result v2
add-int/lit8 v2, v2, 0x12
new-instance v3, Ljava/lang/StringBuilder;
invoke-direct {v3, v2}, Ljava/lang/StringBuilder;-><init>(I)V
const-string v2, "Could not delete: "
invoke-virtual {v3, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v3, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-direct {v0, v1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
throw v0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
.line 10
:cond_2
:goto_1
monitor-exit p0
return-void
:catchall_0
move-exception v0
goto :goto_3
:catchall_1
move-exception v1
.line 11
:try_start_2
iget-object v2, p0, Lcom/google/common/io/FileBackedOutputStream;->memory:Lcom/google/common/io/FileBackedOutputStream$MemoryOutput;
if-nez v2, :cond_3
.line 12
new-instance v2, Lcom/google/common/io/FileBackedOutputStream$MemoryOutput;
invoke-direct {v2, v0}, Lcom/google/common/io/FileBackedOutputStream$MemoryOutput;-><init>(Lcom/google/common/io/FileBackedOutputStream$1;)V
iput-object v2, p0, Lcom/google/common/io/FileBackedOutputStream;->memory:Lcom/google/common/io/FileBackedOutputStream$MemoryOutput;
goto :goto_2
.line 13
:cond_3
iget-object v2, p0, Lcom/google/common/io/FileBackedOutputStream;->memory:Lcom/google/common/io/FileBackedOutputStream$MemoryOutput;
invoke-virtual {v2}, Ljava/io/ByteArrayOutputStream;->reset()V
.line 14
:goto_2
iget-object v2, p0, Lcom/google/common/io/FileBackedOutputStream;->memory:Lcom/google/common/io/FileBackedOutputStream$MemoryOutput;
iput-object v2, p0, Lcom/google/common/io/FileBackedOutputStream;->out:Ljava/io/OutputStream;
.line 15
iget-object v2, p0, Lcom/google/common/io/FileBackedOutputStream;->file:Ljava/io/File;
if-eqz v2, :cond_4
.line 16
iput-object v0, p0, Lcom/google/common/io/FileBackedOutputStream;->file:Ljava/io/File;
.line 17
invoke-virtual {v2}, Ljava/io/File;->delete()Z
move-result v0
if-nez v0, :cond_4
.line 18
new-instance v0, Ljava/io/IOException;
invoke-static {v2}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/String;->length()I
move-result v2
add-int/lit8 v2, v2, 0x12
new-instance v3, Ljava/lang/StringBuilder;
invoke-direct {v3, v2}, Ljava/lang/StringBuilder;-><init>(I)V
const-string v2, "Could not delete: "
invoke-virtual {v3, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v3, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-direct {v0, v1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
throw v0
.line 19
:cond_4
throw v1
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_0
:goto_3
monitor-exit p0
throw v0
.end method
.method public declared-synchronized write(I)V
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
monitor-enter p0
const/4 v0, 0x1
.line 1
:try_start_0
invoke-direct {p0, v0}, Lcom/google/common/io/FileBackedOutputStream;->update(I)V
.line 2
iget-object v0, p0, Lcom/google/common/io/FileBackedOutputStream;->out:Ljava/io/OutputStream;
invoke-virtual {v0, p1}, Ljava/io/OutputStream;->write(I)V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 3
monitor-exit p0
return-void
:catchall_0
move-exception p1
monitor-exit p0
throw p1
.end method
.method public declared-synchronized write([B)V
.locals 2
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
monitor-enter p0
const/4 v0, 0x0
.line 4
:try_start_0
array-length v1, p1
invoke-virtual {p0, p1, v0, v1}, Lcom/google/common/io/FileBackedOutputStream;->write([BII)V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 5
monitor-exit p0
return-void
:catchall_0
move-exception p1
monitor-exit p0
throw p1
.end method
.method public declared-synchronized write([BII)V
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
monitor-enter p0
.line 6
:try_start_0
invoke-direct {p0, p3}, Lcom/google/common/io/FileBackedOutputStream;->update(I)V
.line 7
iget-object v0, p0, Lcom/google/common/io/FileBackedOutputStream;->out:Ljava/io/OutputStream;
invoke-virtual {v0, p1, p2, p3}, Ljava/io/OutputStream;->write([BII)V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 8
monitor-exit p0
return-void
:catchall_0
move-exception p1
monitor-exit p0
throw p1
.end method
@@ -0,0 +1,112 @@
.class public final enum Lcom/google/common/io/FileWriteMode;
.super Ljava/lang/Enum;
.source "FileWriteMode.java"
# annotations
.annotation build Lcom/google/common/annotations/GwtIncompatible;
.end annotation
.annotation runtime Lcom/google/common/io/ElementTypesAreNonnullByDefault;
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/lang/Enum<",
"Lcom/google/common/io/FileWriteMode;",
">;"
}
.end annotation
# static fields
.field private static final synthetic $VALUES:[Lcom/google/common/io/FileWriteMode;
.field public static final enum APPEND:Lcom/google/common/io/FileWriteMode;
# direct methods
.method private static synthetic $values()[Lcom/google/common/io/FileWriteMode;
.locals 3
const/4 v0, 0x1
new-array v0, v0, [Lcom/google/common/io/FileWriteMode;
.line 1
sget-object v1, Lcom/google/common/io/FileWriteMode;->APPEND:Lcom/google/common/io/FileWriteMode;
const/4 v2, 0x0
aput-object v1, v0, v2
return-object v0
.end method
.method public static constructor <clinit>()V
.locals 3
.line 1
new-instance v0, Lcom/google/common/io/FileWriteMode;
const-string v1, "APPEND"
const/4 v2, 0x0
invoke-direct {v0, v1, v2}, Lcom/google/common/io/FileWriteMode;-><init>(Ljava/lang/String;I)V
sput-object v0, Lcom/google/common/io/FileWriteMode;->APPEND:Lcom/google/common/io/FileWriteMode;
.line 2
invoke-static {}, Lcom/google/common/io/FileWriteMode;->$values()[Lcom/google/common/io/FileWriteMode;
move-result-object v0
sput-object v0, Lcom/google/common/io/FileWriteMode;->$VALUES:[Lcom/google/common/io/FileWriteMode;
return-void
.end method
.method private constructor <init>(Ljava/lang/String;I)V
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"()V"
}
.end annotation
.line 1
invoke-direct {p0, p1, p2}, Ljava/lang/Enum;-><init>(Ljava/lang/String;I)V
return-void
.end method
.method public static valueOf(Ljava/lang/String;)Lcom/google/common/io/FileWriteMode;
.locals 1
.line 1
const-class v0, Lcom/google/common/io/FileWriteMode;
invoke-static {v0, p0}, Ljava/lang/Enum;->valueOf(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Enum;
move-result-object p0
check-cast p0, Lcom/google/common/io/FileWriteMode;
return-object p0
.end method
.method public static values()[Lcom/google/common/io/FileWriteMode;
.locals 1
.line 1
sget-object v0, Lcom/google/common/io/FileWriteMode;->$VALUES:[Lcom/google/common/io/FileWriteMode;
invoke-virtual {v0}, [Lcom/google/common/io/FileWriteMode;->clone()Ljava/lang/Object;
move-result-object v0
check-cast v0, [Lcom/google/common/io/FileWriteMode;
return-object v0
.end method
@@ -0,0 +1,100 @@
.class Lcom/google/common/io/Files$1;
.super Ljava/lang/Object;
.source "Files.java"
# interfaces
.implements Lcom/google/common/io/LineProcessor;
# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
value = Lcom/google/common/io/Files;->readLines(Ljava/io/File;Ljava/nio/charset/Charset;)Ljava/util/List;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1
name = null
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/lang/Object;",
"Lcom/google/common/io/LineProcessor<",
"Ljava/util/List<",
"Ljava/lang/String;",
">;>;"
}
.end annotation
# instance fields
.field public final result:Ljava/util/List;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/List<",
"Ljava/lang/String;",
">;"
}
.end annotation
.end field
# direct methods
.method public constructor <init>()V
.locals 1
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 2
invoke-static {}, Lcom/google/common/collect/Lists;->newArrayList()Ljava/util/ArrayList;
move-result-object v0
iput-object v0, p0, Lcom/google/common/io/Files$1;->result:Ljava/util/List;
return-void
.end method
# virtual methods
.method public bridge synthetic getResult()Ljava/lang/Object;
.locals 1
.line 1
invoke-virtual {p0}, Lcom/google/common/io/Files$1;->getResult()Ljava/util/List;
move-result-object v0
return-object v0
.end method
.method public getResult()Ljava/util/List;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Ljava/util/List<",
"Ljava/lang/String;",
">;"
}
.end annotation
.line 2
iget-object v0, p0, Lcom/google/common/io/Files$1;->result:Ljava/util/List;
return-object v0
.end method
.method public processLine(Ljava/lang/String;)Z
.locals 1
.line 1
iget-object v0, p0, Lcom/google/common/io/Files$1;->result:Ljava/util/List;
invoke-interface {v0, p1}, Ljava/util/List;->add(Ljava/lang/Object;)Z
const/4 p1, 0x1
return p1
.end method
@@ -0,0 +1,99 @@
.class Lcom/google/common/io/Files$2;
.super Ljava/lang/Object;
.source "Files.java"
# interfaces
.implements Lcom/google/common/graph/SuccessorsFunction;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/google/common/io/Files;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1
name = null
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/lang/Object;",
"Lcom/google/common/graph/SuccessorsFunction<",
"Ljava/io/File;",
">;"
}
.end annotation
# direct methods
.method public constructor <init>()V
.locals 0
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
# virtual methods
.method public successors(Ljava/io/File;)Ljava/lang/Iterable;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/io/File;",
")",
"Ljava/lang/Iterable<",
"Ljava/io/File;",
">;"
}
.end annotation
.line 2
invoke-virtual {p1}, Ljava/io/File;->isDirectory()Z
move-result v0
if-eqz v0, :cond_0
.line 3
invoke-virtual {p1}, Ljava/io/File;->listFiles()[Ljava/io/File;
move-result-object p1
if-eqz p1, :cond_0
.line 4
invoke-static {p1}, Ljava/util/Arrays;->asList([Ljava/lang/Object;)Ljava/util/List;
move-result-object p1
invoke-static {p1}, Ljava/util/Collections;->unmodifiableList(Ljava/util/List;)Ljava/util/List;
move-result-object p1
return-object p1
.line 5
:cond_0
invoke-static {}, Lcom/google/common/collect/ImmutableList;->of()Lcom/google/common/collect/ImmutableList;
move-result-object p1
return-object p1
.end method
.method public bridge synthetic successors(Ljava/lang/Object;)Ljava/lang/Iterable;
.locals 0
.line 1
check-cast p1, Ljava/io/File;
invoke-virtual {p0, p1}, Lcom/google/common/io/Files$2;->successors(Ljava/io/File;)Ljava/lang/Iterable;
move-result-object p1
return-object p1
.end method
@@ -0,0 +1,155 @@
.class final Lcom/google/common/io/Files$FileByteSink;
.super Lcom/google/common/io/ByteSink;
.source "Files.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/google/common/io/Files;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = "FileByteSink"
.end annotation
# instance fields
.field private final file:Ljava/io/File;
.field private final modes:Lcom/google/common/collect/ImmutableSet;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lcom/google/common/collect/ImmutableSet<",
"Lcom/google/common/io/FileWriteMode;",
">;"
}
.end annotation
.end field
# direct methods
.method private varargs constructor <init>(Ljava/io/File;[Lcom/google/common/io/FileWriteMode;)V
.locals 0
.line 2
invoke-direct {p0}, Lcom/google/common/io/ByteSink;-><init>()V
.line 3
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p1
check-cast p1, Ljava/io/File;
iput-object p1, p0, Lcom/google/common/io/Files$FileByteSink;->file:Ljava/io/File;
.line 4
invoke-static {p2}, Lcom/google/common/collect/ImmutableSet;->copyOf([Ljava/lang/Object;)Lcom/google/common/collect/ImmutableSet;
move-result-object p1
iput-object p1, p0, Lcom/google/common/io/Files$FileByteSink;->modes:Lcom/google/common/collect/ImmutableSet;
return-void
.end method
.method public synthetic constructor <init>(Ljava/io/File;[Lcom/google/common/io/FileWriteMode;Lcom/google/common/io/Files$1;)V
.locals 0
.line 1
invoke-direct {p0, p1, p2}, Lcom/google/common/io/Files$FileByteSink;-><init>(Ljava/io/File;[Lcom/google/common/io/FileWriteMode;)V
return-void
.end method
# virtual methods
.method public openStream()Ljava/io/FileOutputStream;
.locals 4
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 2
new-instance v0, Ljava/io/FileOutputStream;
iget-object v1, p0, Lcom/google/common/io/Files$FileByteSink;->file:Ljava/io/File;
iget-object v2, p0, Lcom/google/common/io/Files$FileByteSink;->modes:Lcom/google/common/collect/ImmutableSet;
sget-object v3, Lcom/google/common/io/FileWriteMode;->APPEND:Lcom/google/common/io/FileWriteMode;
invoke-virtual {v2, v3}, Lcom/google/common/collect/ImmutableCollection;->contains(Ljava/lang/Object;)Z
move-result v2
invoke-direct {v0, v1, v2}, Ljava/io/FileOutputStream;-><init>(Ljava/io/File;Z)V
return-object v0
.end method
.method public bridge synthetic openStream()Ljava/io/OutputStream;
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
invoke-virtual {p0}, Lcom/google/common/io/Files$FileByteSink;->openStream()Ljava/io/FileOutputStream;
move-result-object v0
return-object v0
.end method
.method public toString()Ljava/lang/String;
.locals 5
.line 1
iget-object v0, p0, Lcom/google/common/io/Files$FileByteSink;->file:Ljava/io/File;
invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
move-result-object v0
iget-object v1, p0, Lcom/google/common/io/Files$FileByteSink;->modes:Lcom/google/common/collect/ImmutableSet;
invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
move-result-object v1
invoke-virtual {v0}, Ljava/lang/String;->length()I
move-result v2
add-int/lit8 v2, v2, 0x14
invoke-virtual {v1}, Ljava/lang/String;->length()I
move-result v3
add-int/2addr v3, v2
const-string v2, "Files.asByteSink("
const-string v4, ", "
invoke-static {v3, v2, v0, v4, v1}, Lcom/google/ads/mediation/a;->a(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;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;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
return-object v0
.end method
@@ -0,0 +1,265 @@
.class final Lcom/google/common/io/Files$FileByteSource;
.super Lcom/google/common/io/ByteSource;
.source "Files.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/google/common/io/Files;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = "FileByteSource"
.end annotation
# instance fields
.field private final file:Ljava/io/File;
# direct methods
.method private constructor <init>(Ljava/io/File;)V
.locals 0
.line 2
invoke-direct {p0}, Lcom/google/common/io/ByteSource;-><init>()V
.line 3
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p1
check-cast p1, Ljava/io/File;
iput-object p1, p0, Lcom/google/common/io/Files$FileByteSource;->file:Ljava/io/File;
return-void
.end method
.method public synthetic constructor <init>(Ljava/io/File;Lcom/google/common/io/Files$1;)V
.locals 0
.line 1
invoke-direct {p0, p1}, Lcom/google/common/io/Files$FileByteSource;-><init>(Ljava/io/File;)V
return-void
.end method
# virtual methods
.method public openStream()Ljava/io/FileInputStream;
.locals 2
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 2
new-instance v0, Ljava/io/FileInputStream;
iget-object v1, p0, Lcom/google/common/io/Files$FileByteSource;->file:Ljava/io/File;
invoke-direct {v0, v1}, Ljava/io/FileInputStream;-><init>(Ljava/io/File;)V
return-object v0
.end method
.method public bridge synthetic openStream()Ljava/io/InputStream;
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
invoke-virtual {p0}, Lcom/google/common/io/Files$FileByteSource;->openStream()Ljava/io/FileInputStream;
move-result-object v0
return-object v0
.end method
.method public read()[B
.locals 4
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
invoke-static {}, Lcom/google/common/io/Closer;->create()Lcom/google/common/io/Closer;
move-result-object v0
.line 2
:try_start_0
invoke-virtual {p0}, Lcom/google/common/io/Files$FileByteSource;->openStream()Ljava/io/FileInputStream;
move-result-object v1
invoke-virtual {v0, v1}, Lcom/google/common/io/Closer;->register(Ljava/io/Closeable;)Ljava/io/Closeable;
move-result-object v1
check-cast v1, Ljava/io/FileInputStream;
.line 3
invoke-virtual {v1}, Ljava/io/FileInputStream;->getChannel()Ljava/nio/channels/FileChannel;
move-result-object v2
invoke-virtual {v2}, Ljava/nio/channels/FileChannel;->size()J
move-result-wide v2
invoke-static {v1, v2, v3}, Lcom/google/common/io/ByteStreams;->toByteArray(Ljava/io/InputStream;J)[B
move-result-object v1
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 4
invoke-virtual {v0}, Lcom/google/common/io/Closer;->close()V
return-object v1
:catchall_0
move-exception v1
.line 5
:try_start_1
invoke-virtual {v0, v1}, Lcom/google/common/io/Closer;->rethrow(Ljava/lang/Throwable;)Ljava/lang/RuntimeException;
move-result-object v1
throw v1
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_1
:catchall_1
move-exception v1
.line 6
invoke-virtual {v0}, Lcom/google/common/io/Closer;->close()V
.line 7
throw v1
.end method
.method public size()J
.locals 2
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
iget-object v0, p0, Lcom/google/common/io/Files$FileByteSource;->file:Ljava/io/File;
invoke-virtual {v0}, Ljava/io/File;->isFile()Z
move-result v0
if-eqz v0, :cond_0
.line 2
iget-object v0, p0, Lcom/google/common/io/Files$FileByteSource;->file:Ljava/io/File;
invoke-virtual {v0}, Ljava/io/File;->length()J
move-result-wide v0
return-wide v0
.line 3
:cond_0
new-instance v0, Ljava/io/FileNotFoundException;
iget-object v1, p0, Lcom/google/common/io/Files$FileByteSource;->file:Ljava/io/File;
invoke-virtual {v1}, Ljava/io/File;->toString()Ljava/lang/String;
move-result-object v1
invoke-direct {v0, v1}, Ljava/io/FileNotFoundException;-><init>(Ljava/lang/String;)V
throw v0
.end method
.method public sizeIfKnown()Lcom/google/common/base/Optional;
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Lcom/google/common/base/Optional<",
"Ljava/lang/Long;",
">;"
}
.end annotation
.line 1
iget-object v0, p0, Lcom/google/common/io/Files$FileByteSource;->file:Ljava/io/File;
invoke-virtual {v0}, Ljava/io/File;->isFile()Z
move-result v0
if-eqz v0, :cond_0
.line 2
iget-object v0, p0, Lcom/google/common/io/Files$FileByteSource;->file:Ljava/io/File;
invoke-virtual {v0}, Ljava/io/File;->length()J
move-result-wide v0
invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
move-result-object v0
invoke-static {v0}, Lcom/google/common/base/Optional;->of(Ljava/lang/Object;)Lcom/google/common/base/Optional;
move-result-object v0
return-object v0
.line 3
:cond_0
invoke-static {}, Lcom/google/common/base/Optional;->absent()Lcom/google/common/base/Optional;
move-result-object v0
return-object v0
.end method
.method public toString()Ljava/lang/String;
.locals 4
.line 1
iget-object v0, p0, Lcom/google/common/io/Files$FileByteSource;->file:Ljava/io/File;
invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/String;->length()I
move-result v1
add-int/lit8 v1, v1, 0x14
const-string v2, "Files.asByteSource("
const-string v3, ")"
invoke-static {v1, v2, v0, v3}, Lcom/google/android/gms/ads/internal/a;->a(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
return-object v0
.end method
@@ -0,0 +1,61 @@
.class final enum Lcom/google/common/io/Files$FilePredicate$1;
.super Lcom/google/common/io/Files$FilePredicate;
.source "Files.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/google/common/io/Files$FilePredicate;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x4011
name = null
.end annotation
# direct methods
.method public constructor <init>(Ljava/lang/String;I)V
.locals 1
const/4 v0, 0x0
.line 1
invoke-direct {p0, p1, p2, v0}, Lcom/google/common/io/Files$FilePredicate;-><init>(Ljava/lang/String;ILcom/google/common/io/Files$1;)V
return-void
.end method
# virtual methods
.method public apply(Ljava/io/File;)Z
.locals 0
.line 2
invoke-virtual {p1}, Ljava/io/File;->isDirectory()Z
move-result p1
return p1
.end method
.method public bridge synthetic apply(Ljava/lang/Object;)Z
.locals 0
.line 1
check-cast p1, Ljava/io/File;
invoke-virtual {p0, p1}, Lcom/google/common/io/Files$FilePredicate$1;->apply(Ljava/io/File;)Z
move-result p1
return p1
.end method
.method public toString()Ljava/lang/String;
.locals 1
const-string v0, "Files.isDirectory()"
return-object v0
.end method
@@ -0,0 +1,61 @@
.class final enum Lcom/google/common/io/Files$FilePredicate$2;
.super Lcom/google/common/io/Files$FilePredicate;
.source "Files.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/google/common/io/Files$FilePredicate;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x4011
name = null
.end annotation
# direct methods
.method public constructor <init>(Ljava/lang/String;I)V
.locals 1
const/4 v0, 0x0
.line 1
invoke-direct {p0, p1, p2, v0}, Lcom/google/common/io/Files$FilePredicate;-><init>(Ljava/lang/String;ILcom/google/common/io/Files$1;)V
return-void
.end method
# virtual methods
.method public apply(Ljava/io/File;)Z
.locals 0
.line 2
invoke-virtual {p1}, Ljava/io/File;->isFile()Z
move-result p1
return p1
.end method
.method public bridge synthetic apply(Ljava/lang/Object;)Z
.locals 0
.line 1
check-cast p1, Ljava/io/File;
invoke-virtual {p0, p1}, Lcom/google/common/io/Files$FilePredicate$2;->apply(Ljava/io/File;)Z
move-result p1
return p1
.end method
.method public toString()Ljava/lang/String;
.locals 1
const-string v0, "Files.isFile()"
return-object v0
.end method
@@ -0,0 +1,149 @@
.class abstract enum Lcom/google/common/io/Files$FilePredicate;
.super Ljava/lang/Enum;
.source "Files.java"
# interfaces
.implements Lcom/google/common/base/Predicate;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/google/common/io/Files;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x4409
name = "FilePredicate"
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/lang/Enum<",
"Lcom/google/common/io/Files$FilePredicate;",
">;",
"Lcom/google/common/base/Predicate<",
"Ljava/io/File;",
">;"
}
.end annotation
# static fields
.field private static final synthetic $VALUES:[Lcom/google/common/io/Files$FilePredicate;
.field public static final enum IS_DIRECTORY:Lcom/google/common/io/Files$FilePredicate;
.field public static final enum IS_FILE:Lcom/google/common/io/Files$FilePredicate;
# direct methods
.method private static synthetic $values()[Lcom/google/common/io/Files$FilePredicate;
.locals 3
const/4 v0, 0x2
new-array v0, v0, [Lcom/google/common/io/Files$FilePredicate;
.line 1
sget-object v1, Lcom/google/common/io/Files$FilePredicate;->IS_DIRECTORY:Lcom/google/common/io/Files$FilePredicate;
const/4 v2, 0x0
aput-object v1, v0, v2
sget-object v1, Lcom/google/common/io/Files$FilePredicate;->IS_FILE:Lcom/google/common/io/Files$FilePredicate;
const/4 v2, 0x1
aput-object v1, v0, v2
return-object v0
.end method
.method public static constructor <clinit>()V
.locals 3
.line 1
new-instance v0, Lcom/google/common/io/Files$FilePredicate$1;
const-string v1, "IS_DIRECTORY"
const/4 v2, 0x0
invoke-direct {v0, v1, v2}, Lcom/google/common/io/Files$FilePredicate$1;-><init>(Ljava/lang/String;I)V
sput-object v0, Lcom/google/common/io/Files$FilePredicate;->IS_DIRECTORY:Lcom/google/common/io/Files$FilePredicate;
.line 2
new-instance v0, Lcom/google/common/io/Files$FilePredicate$2;
const-string v1, "IS_FILE"
const/4 v2, 0x1
invoke-direct {v0, v1, v2}, Lcom/google/common/io/Files$FilePredicate$2;-><init>(Ljava/lang/String;I)V
sput-object v0, Lcom/google/common/io/Files$FilePredicate;->IS_FILE:Lcom/google/common/io/Files$FilePredicate;
.line 3
invoke-static {}, Lcom/google/common/io/Files$FilePredicate;->$values()[Lcom/google/common/io/Files$FilePredicate;
move-result-object v0
sput-object v0, Lcom/google/common/io/Files$FilePredicate;->$VALUES:[Lcom/google/common/io/Files$FilePredicate;
return-void
.end method
.method private constructor <init>(Ljava/lang/String;I)V
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"()V"
}
.end annotation
.line 1
invoke-direct {p0, p1, p2}, Ljava/lang/Enum;-><init>(Ljava/lang/String;I)V
return-void
.end method
.method public synthetic constructor <init>(Ljava/lang/String;ILcom/google/common/io/Files$1;)V
.locals 0
.line 2
invoke-direct {p0, p1, p2}, Lcom/google/common/io/Files$FilePredicate;-><init>(Ljava/lang/String;I)V
return-void
.end method
.method public static valueOf(Ljava/lang/String;)Lcom/google/common/io/Files$FilePredicate;
.locals 1
.line 1
const-class v0, Lcom/google/common/io/Files$FilePredicate;
invoke-static {v0, p0}, Ljava/lang/Enum;->valueOf(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Enum;
move-result-object p0
check-cast p0, Lcom/google/common/io/Files$FilePredicate;
return-object p0
.end method
.method public static values()[Lcom/google/common/io/Files$FilePredicate;
.locals 1
.line 1
sget-object v0, Lcom/google/common/io/Files$FilePredicate;->$VALUES:[Lcom/google/common/io/Files$FilePredicate;
invoke-virtual {v0}, [Lcom/google/common/io/Files$FilePredicate;->clone()Ljava/lang/Object;
move-result-object v0
check-cast v0, [Lcom/google/common/io/Files$FilePredicate;
return-object v0
.end method
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,115 @@
.class public final Lcom/google/common/io/Flushables;
.super Ljava/lang/Object;
.source "Flushables.java"
# annotations
.annotation build Lcom/google/common/annotations/Beta;
.end annotation
.annotation build Lcom/google/common/annotations/GwtIncompatible;
.end annotation
.annotation runtime Lcom/google/common/io/ElementTypesAreNonnullByDefault;
.end annotation
# static fields
.field private static final logger:Ljava/util/logging/Logger;
# direct methods
.method public static constructor <clinit>()V
.locals 1
.line 1
const-class v0, Lcom/google/common/io/Flushables;
invoke-virtual {v0}, Ljava/lang/Class;->getName()Ljava/lang/String;
move-result-object v0
invoke-static {v0}, Ljava/util/logging/Logger;->getLogger(Ljava/lang/String;)Ljava/util/logging/Logger;
move-result-object v0
sput-object v0, Lcom/google/common/io/Flushables;->logger:Ljava/util/logging/Logger;
return-void
.end method
.method private constructor <init>()V
.locals 0
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static flush(Ljava/io/Flushable;Z)V
.locals 2
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
:try_start_0
invoke-interface {p0}, Ljava/io/Flushable;->flush()V
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
goto :goto_0
:catch_0
move-exception p0
if-eqz p1, :cond_0
.line 2
sget-object p1, Lcom/google/common/io/Flushables;->logger:Ljava/util/logging/Logger;
sget-object v0, Ljava/util/logging/Level;->WARNING:Ljava/util/logging/Level;
const-string v1, "IOException thrown while flushing Flushable."
invoke-virtual {p1, v0, v1, p0}, Ljava/util/logging/Logger;->log(Ljava/util/logging/Level;Ljava/lang/String;Ljava/lang/Throwable;)V
:goto_0
return-void
.line 3
:cond_0
throw p0
.end method
.method public static flushQuietly(Ljava/io/Flushable;)V
.locals 3
const/4 v0, 0x1
.line 1
:try_start_0
invoke-static {p0, v0}, Lcom/google/common/io/Flushables;->flush(Ljava/io/Flushable;Z)V
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
goto :goto_0
:catch_0
move-exception p0
.line 2
sget-object v0, Lcom/google/common/io/Flushables;->logger:Ljava/util/logging/Logger;
sget-object v1, Ljava/util/logging/Level;->SEVERE:Ljava/util/logging/Level;
const-string v2, "IOException should not have been thrown."
invoke-virtual {v0, v1, v2, p0}, Ljava/util/logging/Logger;->log(Ljava/util/logging/Level;Ljava/lang/String;Ljava/lang/Throwable;)V
:goto_0
return-void
.end method
@@ -0,0 +1,76 @@
.class final Lcom/google/common/io/Java8Compatibility;
.super Ljava/lang/Object;
.source "Java8Compatibility.java"
# annotations
.annotation build Lcom/google/common/annotations/GwtIncompatible;
.end annotation
.annotation runtime Lcom/google/common/io/ElementTypesAreNonnullByDefault;
.end annotation
# direct methods
.method private constructor <init>()V
.locals 0
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static clear(Ljava/nio/Buffer;)V
.locals 0
.line 1
invoke-virtual {p0}, Ljava/nio/Buffer;->clear()Ljava/nio/Buffer;
return-void
.end method
.method public static flip(Ljava/nio/Buffer;)V
.locals 0
.line 1
invoke-virtual {p0}, Ljava/nio/Buffer;->flip()Ljava/nio/Buffer;
return-void
.end method
.method public static limit(Ljava/nio/Buffer;I)V
.locals 0
.line 1
invoke-virtual {p0, p1}, Ljava/nio/Buffer;->limit(I)Ljava/nio/Buffer;
return-void
.end method
.method public static mark(Ljava/nio/Buffer;)V
.locals 0
.line 1
invoke-virtual {p0}, Ljava/nio/Buffer;->mark()Ljava/nio/Buffer;
return-void
.end method
.method public static position(Ljava/nio/Buffer;I)V
.locals 0
.line 1
invoke-virtual {p0, p1}, Ljava/nio/Buffer;->position(I)Ljava/nio/Buffer;
return-void
.end method
.method public static reset(Ljava/nio/Buffer;)V
.locals 0
.line 1
invoke-virtual {p0}, Ljava/nio/Buffer;->reset()Ljava/nio/Buffer;
return-void
.end method
@@ -0,0 +1,273 @@
.class abstract Lcom/google/common/io/LineBuffer;
.super Ljava/lang/Object;
.source "LineBuffer.java"
# annotations
.annotation build Lcom/google/common/annotations/GwtIncompatible;
.end annotation
.annotation runtime Lcom/google/common/io/ElementTypesAreNonnullByDefault;
.end annotation
# instance fields
.field private line:Ljava/lang/StringBuilder;
.field private sawReturn:Z
# direct methods
.method public constructor <init>()V
.locals 1
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 2
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
iput-object v0, p0, Lcom/google/common/io/LineBuffer;->line:Ljava/lang/StringBuilder;
return-void
.end method
.method private finishLine(Z)Z
.locals 2
.annotation build Lcom/google/errorprone/annotations/CanIgnoreReturnValue;
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
iget-boolean v0, p0, Lcom/google/common/io/LineBuffer;->sawReturn:Z
if-eqz v0, :cond_1
if-eqz p1, :cond_0
const-string v0, "\r\n"
goto :goto_0
:cond_0
const-string v0, "\r"
goto :goto_0
:cond_1
if-eqz p1, :cond_2
const-string v0, "\n"
goto :goto_0
:cond_2
const-string v0, ""
.line 2
:goto_0
iget-object v1, p0, Lcom/google/common/io/LineBuffer;->line:Ljava/lang/StringBuilder;
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-virtual {p0, v1, v0}, Lcom/google/common/io/LineBuffer;->handleLine(Ljava/lang/String;Ljava/lang/String;)V
.line 3
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
iput-object v0, p0, Lcom/google/common/io/LineBuffer;->line:Ljava/lang/StringBuilder;
const/4 v0, 0x0
.line 4
iput-boolean v0, p0, Lcom/google/common/io/LineBuffer;->sawReturn:Z
return p1
.end method
# virtual methods
.method public add([CII)V
.locals 6
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
iget-boolean v0, p0, Lcom/google/common/io/LineBuffer;->sawReturn:Z
const/4 v1, 0x0
const/16 v2, 0xa
const/4 v3, 0x1
if-eqz v0, :cond_1
if-lez p3, :cond_1
.line 2
aget-char v0, p1, p2
if-ne v0, v2, :cond_0
move v0, v3
goto :goto_0
:cond_0
move v0, v1
:goto_0
invoke-direct {p0, v0}, Lcom/google/common/io/LineBuffer;->finishLine(Z)Z
move-result v0
if-eqz v0, :cond_1
add-int/lit8 v0, p2, 0x1
goto :goto_1
:cond_1
move v0, p2
:goto_1
add-int/2addr p2, p3
move p3, v0
:goto_2
if-ge v0, p2, :cond_6
.line 3
aget-char v4, p1, v0
if-eq v4, v2, :cond_4
const/16 v5, 0xd
if-eq v4, v5, :cond_2
goto :goto_5
.line 4
:cond_2
iget-object v4, p0, Lcom/google/common/io/LineBuffer;->line:Ljava/lang/StringBuilder;
sub-int v5, v0, p3
invoke-virtual {v4, p1, p3, v5}, Ljava/lang/StringBuilder;->append([CII)Ljava/lang/StringBuilder;
.line 5
iput-boolean v3, p0, Lcom/google/common/io/LineBuffer;->sawReturn:Z
add-int/lit8 p3, v0, 0x1
if-ge p3, p2, :cond_5
.line 6
aget-char v4, p1, p3
if-ne v4, v2, :cond_3
move v4, v3
goto :goto_3
:cond_3
move v4, v1
:goto_3
invoke-direct {p0, v4}, Lcom/google/common/io/LineBuffer;->finishLine(Z)Z
move-result v4
if-eqz v4, :cond_5
move v0, p3
goto :goto_4
.line 7
:cond_4
iget-object v4, p0, Lcom/google/common/io/LineBuffer;->line:Ljava/lang/StringBuilder;
sub-int v5, v0, p3
invoke-virtual {v4, p1, p3, v5}, Ljava/lang/StringBuilder;->append([CII)Ljava/lang/StringBuilder;
.line 8
invoke-direct {p0, v3}, Lcom/google/common/io/LineBuffer;->finishLine(Z)Z
:cond_5
:goto_4
add-int/lit8 p3, v0, 0x1
:goto_5
add-int/2addr v0, v3
goto :goto_2
.line 9
:cond_6
iget-object v0, p0, Lcom/google/common/io/LineBuffer;->line:Ljava/lang/StringBuilder;
sub-int/2addr p2, p3
invoke-virtual {v0, p1, p3, p2}, Ljava/lang/StringBuilder;->append([CII)Ljava/lang/StringBuilder;
return-void
.end method
.method public finish()V
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
iget-boolean v0, p0, Lcom/google/common/io/LineBuffer;->sawReturn:Z
if-nez v0, :cond_0
iget-object v0, p0, Lcom/google/common/io/LineBuffer;->line:Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->length()I
move-result v0
if-lez v0, :cond_1
:cond_0
const/4 v0, 0x0
.line 2
invoke-direct {p0, v0}, Lcom/google/common/io/LineBuffer;->finishLine(Z)Z
:cond_1
return-void
.end method
.method public abstract handleLine(Ljava/lang/String;Ljava/lang/String;)V
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.end method
@@ -0,0 +1,47 @@
.class public interface abstract Lcom/google/common/io/LineProcessor;
.super Ljava/lang/Object;
.source "LineProcessor.java"
# annotations
.annotation build Lcom/google/common/annotations/Beta;
.end annotation
.annotation build Lcom/google/common/annotations/GwtIncompatible;
.end annotation
.annotation runtime Lcom/google/common/io/ElementTypesAreNonnullByDefault;
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">",
"Ljava/lang/Object;"
}
.end annotation
# virtual methods
.method public abstract getResult()Ljava/lang/Object;
.annotation runtime Lcom/google/common/io/ParametricNullness;
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"()TT;"
}
.end annotation
.end method
.method public abstract processLine(Ljava/lang/String;)Z
.annotation build Lcom/google/errorprone/annotations/CanIgnoreReturnValue;
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.end method
@@ -0,0 +1,48 @@
.class Lcom/google/common/io/LineReader$1;
.super Lcom/google/common/io/LineBuffer;
.source "LineReader.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/google/common/io/LineReader;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1
name = null
.end annotation
# instance fields
.field public final synthetic this$0:Lcom/google/common/io/LineReader;
# direct methods
.method public constructor <init>(Lcom/google/common/io/LineReader;)V
.locals 0
.line 1
iput-object p1, p0, Lcom/google/common/io/LineReader$1;->this$0:Lcom/google/common/io/LineReader;
invoke-direct {p0}, Lcom/google/common/io/LineBuffer;-><init>()V
return-void
.end method
# virtual methods
.method public handleLine(Ljava/lang/String;Ljava/lang/String;)V
.locals 0
.line 1
iget-object p2, p0, Lcom/google/common/io/LineReader$1;->this$0:Lcom/google/common/io/LineReader;
invoke-static {p2}, Lcom/google/common/io/LineReader;->access$000(Lcom/google/common/io/LineReader;)Ljava/util/Queue;
move-result-object p2
invoke-interface {p2, p1}, Ljava/util/Queue;->add(Ljava/lang/Object;)Z
return-void
.end method
@@ -0,0 +1,204 @@
.class public final Lcom/google/common/io/LineReader;
.super Ljava/lang/Object;
.source "LineReader.java"
# annotations
.annotation build Lcom/google/common/annotations/Beta;
.end annotation
.annotation build Lcom/google/common/annotations/GwtIncompatible;
.end annotation
.annotation runtime Lcom/google/common/io/ElementTypesAreNonnullByDefault;
.end annotation
# instance fields
.field private final buf:[C
.field private final cbuf:Ljava/nio/CharBuffer;
.field private final lineBuf:Lcom/google/common/io/LineBuffer;
.field private final lines:Ljava/util/Queue;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/Queue<",
"Ljava/lang/String;",
">;"
}
.end annotation
.end field
.field private final readable:Ljava/lang/Readable;
.field private final reader:Ljava/io/Reader;
.annotation runtime Ljavax/annotation/CheckForNull;
.end annotation
.end field
# direct methods
.method public constructor <init>(Ljava/lang/Readable;)V
.locals 1
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 2
invoke-static {}, Lcom/google/common/io/CharStreams;->createBuffer()Ljava/nio/CharBuffer;
move-result-object v0
iput-object v0, p0, Lcom/google/common/io/LineReader;->cbuf:Ljava/nio/CharBuffer;
.line 3
invoke-virtual {v0}, Ljava/nio/CharBuffer;->array()[C
move-result-object v0
iput-object v0, p0, Lcom/google/common/io/LineReader;->buf:[C
.line 4
new-instance v0, Ljava/util/ArrayDeque;
invoke-direct {v0}, Ljava/util/ArrayDeque;-><init>()V
iput-object v0, p0, Lcom/google/common/io/LineReader;->lines:Ljava/util/Queue;
.line 5
new-instance v0, Lcom/google/common/io/LineReader$1;
invoke-direct {v0, p0}, Lcom/google/common/io/LineReader$1;-><init>(Lcom/google/common/io/LineReader;)V
iput-object v0, p0, Lcom/google/common/io/LineReader;->lineBuf:Lcom/google/common/io/LineBuffer;
.line 6
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/lang/Readable;
iput-object v0, p0, Lcom/google/common/io/LineReader;->readable:Ljava/lang/Readable;
.line 7
instance-of v0, p1, Ljava/io/Reader;
if-eqz v0, :cond_0
check-cast p1, Ljava/io/Reader;
goto :goto_0
:cond_0
const/4 p1, 0x0
:goto_0
iput-object p1, p0, Lcom/google/common/io/LineReader;->reader:Ljava/io/Reader;
return-void
.end method
.method public static synthetic access$000(Lcom/google/common/io/LineReader;)Ljava/util/Queue;
.locals 0
.line 1
iget-object p0, p0, Lcom/google/common/io/LineReader;->lines:Ljava/util/Queue;
return-object p0
.end method
# virtual methods
.method public readLine()Ljava/lang/String;
.locals 4
.annotation build Lcom/google/errorprone/annotations/CanIgnoreReturnValue;
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.annotation runtime Ljavax/annotation/CheckForNull;
.end annotation
.line 1
:goto_0
iget-object v0, p0, Lcom/google/common/io/LineReader;->lines:Ljava/util/Queue;
invoke-interface {v0}, Ljava/util/Queue;->peek()Ljava/lang/Object;
move-result-object v0
if-nez v0, :cond_2
.line 2
iget-object v0, p0, Lcom/google/common/io/LineReader;->cbuf:Ljava/nio/CharBuffer;
invoke-static {v0}, Lcom/google/common/io/Java8Compatibility;->clear(Ljava/nio/Buffer;)V
.line 3
iget-object v0, p0, Lcom/google/common/io/LineReader;->reader:Ljava/io/Reader;
const/4 v1, 0x0
if-eqz v0, :cond_0
iget-object v2, p0, Lcom/google/common/io/LineReader;->buf:[C
array-length v3, v2
invoke-virtual {v0, v2, v1, v3}, Ljava/io/Reader;->read([CII)I
move-result v0
goto :goto_1
:cond_0
iget-object v0, p0, Lcom/google/common/io/LineReader;->readable:Ljava/lang/Readable;
iget-object v2, p0, Lcom/google/common/io/LineReader;->cbuf:Ljava/nio/CharBuffer;
invoke-interface {v0, v2}, Ljava/lang/Readable;->read(Ljava/nio/CharBuffer;)I
move-result v0
:goto_1
const/4 v2, -0x1
if-ne v0, v2, :cond_1
.line 4
iget-object v0, p0, Lcom/google/common/io/LineReader;->lineBuf:Lcom/google/common/io/LineBuffer;
invoke-virtual {v0}, Lcom/google/common/io/LineBuffer;->finish()V
goto :goto_2
.line 5
:cond_1
iget-object v2, p0, Lcom/google/common/io/LineReader;->lineBuf:Lcom/google/common/io/LineBuffer;
iget-object v3, p0, Lcom/google/common/io/LineReader;->buf:[C
invoke-virtual {v2, v3, v1, v0}, Lcom/google/common/io/LineBuffer;->add([CII)V
goto :goto_0
.line 6
:cond_2
:goto_2
iget-object v0, p0, Lcom/google/common/io/LineReader;->lines:Ljava/util/Queue;
invoke-interface {v0}, Ljava/util/Queue;->poll()Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/lang/String;
return-object v0
.end method
@@ -0,0 +1,461 @@
.class public final Lcom/google/common/io/LittleEndianDataInputStream;
.super Ljava/io/FilterInputStream;
.source "LittleEndianDataInputStream.java"
# interfaces
.implements Ljava/io/DataInput;
# annotations
.annotation build Lcom/google/common/annotations/Beta;
.end annotation
.annotation build Lcom/google/common/annotations/GwtIncompatible;
.end annotation
.annotation runtime Lcom/google/common/io/ElementTypesAreNonnullByDefault;
.end annotation
# direct methods
.method public constructor <init>(Ljava/io/InputStream;)V
.locals 0
.line 1
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p1
check-cast p1, Ljava/io/InputStream;
invoke-direct {p0, p1}, Ljava/io/FilterInputStream;-><init>(Ljava/io/InputStream;)V
return-void
.end method
.method private readAndCheckByte()B
.locals 2
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;,
Ljava/io/EOFException;
}
.end annotation
.line 1
iget-object v0, p0, Ljava/io/FilterInputStream;->in:Ljava/io/InputStream;
invoke-virtual {v0}, Ljava/io/InputStream;->read()I
move-result v0
const/4 v1, -0x1
if-eq v1, v0, :cond_0
int-to-byte v0, v0
return v0
.line 2
:cond_0
new-instance v0, Ljava/io/EOFException;
invoke-direct {v0}, Ljava/io/EOFException;-><init>()V
throw v0
.end method
# virtual methods
.method public readBoolean()Z
.locals 1
.annotation build Lcom/google/errorprone/annotations/CanIgnoreReturnValue;
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
invoke-virtual {p0}, Lcom/google/common/io/LittleEndianDataInputStream;->readUnsignedByte()I
move-result v0
if-eqz v0, :cond_0
const/4 v0, 0x1
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
return v0
.end method
.method public readByte()B
.locals 1
.annotation build Lcom/google/errorprone/annotations/CanIgnoreReturnValue;
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
invoke-virtual {p0}, Lcom/google/common/io/LittleEndianDataInputStream;->readUnsignedByte()I
move-result v0
int-to-byte v0, v0
return v0
.end method
.method public readChar()C
.locals 1
.annotation build Lcom/google/errorprone/annotations/CanIgnoreReturnValue;
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
invoke-virtual {p0}, Lcom/google/common/io/LittleEndianDataInputStream;->readUnsignedShort()I
move-result v0
int-to-char v0, v0
return v0
.end method
.method public readDouble()D
.locals 2
.annotation build Lcom/google/errorprone/annotations/CanIgnoreReturnValue;
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
invoke-virtual {p0}, Lcom/google/common/io/LittleEndianDataInputStream;->readLong()J
move-result-wide v0
invoke-static {v0, v1}, Ljava/lang/Double;->longBitsToDouble(J)D
move-result-wide v0
return-wide v0
.end method
.method public readFloat()F
.locals 1
.annotation build Lcom/google/errorprone/annotations/CanIgnoreReturnValue;
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
invoke-virtual {p0}, Lcom/google/common/io/LittleEndianDataInputStream;->readInt()I
move-result v0
invoke-static {v0}, Ljava/lang/Float;->intBitsToFloat(I)F
move-result v0
return v0
.end method
.method public readFully([B)V
.locals 0
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
invoke-static {p0, p1}, Lcom/google/common/io/ByteStreams;->readFully(Ljava/io/InputStream;[B)V
return-void
.end method
.method public readFully([BII)V
.locals 0
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 2
invoke-static {p0, p1, p2, p3}, Lcom/google/common/io/ByteStreams;->readFully(Ljava/io/InputStream;[BII)V
return-void
.end method
.method public readInt()I
.locals 4
.annotation build Lcom/google/errorprone/annotations/CanIgnoreReturnValue;
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
invoke-direct {p0}, Lcom/google/common/io/LittleEndianDataInputStream;->readAndCheckByte()B
move-result v0
.line 2
invoke-direct {p0}, Lcom/google/common/io/LittleEndianDataInputStream;->readAndCheckByte()B
move-result v1
.line 3
invoke-direct {p0}, Lcom/google/common/io/LittleEndianDataInputStream;->readAndCheckByte()B
move-result v2
.line 4
invoke-direct {p0}, Lcom/google/common/io/LittleEndianDataInputStream;->readAndCheckByte()B
move-result v3
.line 5
invoke-static {v3, v2, v1, v0}, Lcom/google/common/primitives/Ints;->fromBytes(BBBB)I
move-result v0
return v0
.end method
.method public readLine()Ljava/lang/String;
.locals 2
.annotation build Lcom/google/errorprone/annotations/CanIgnoreReturnValue;
.end annotation
.annotation build Lcom/google/errorprone/annotations/DoNotCall;
value = "Always throws UnsupportedOperationException"
.end annotation
.line 1
new-instance v0, Ljava/lang/UnsupportedOperationException;
const-string v1, "readLine is not supported"
invoke-direct {v0, v1}, Ljava/lang/UnsupportedOperationException;-><init>(Ljava/lang/String;)V
throw v0
.end method
.method public readLong()J
.locals 8
.annotation build Lcom/google/errorprone/annotations/CanIgnoreReturnValue;
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
invoke-direct {p0}, Lcom/google/common/io/LittleEndianDataInputStream;->readAndCheckByte()B
move-result v7
.line 2
invoke-direct {p0}, Lcom/google/common/io/LittleEndianDataInputStream;->readAndCheckByte()B
move-result v6
.line 3
invoke-direct {p0}, Lcom/google/common/io/LittleEndianDataInputStream;->readAndCheckByte()B
move-result v5
.line 4
invoke-direct {p0}, Lcom/google/common/io/LittleEndianDataInputStream;->readAndCheckByte()B
move-result v4
.line 5
invoke-direct {p0}, Lcom/google/common/io/LittleEndianDataInputStream;->readAndCheckByte()B
move-result v3
.line 6
invoke-direct {p0}, Lcom/google/common/io/LittleEndianDataInputStream;->readAndCheckByte()B
move-result v2
.line 7
invoke-direct {p0}, Lcom/google/common/io/LittleEndianDataInputStream;->readAndCheckByte()B
move-result v1
.line 8
invoke-direct {p0}, Lcom/google/common/io/LittleEndianDataInputStream;->readAndCheckByte()B
move-result v0
.line 9
invoke-static/range {v0 .. v7}, Lcom/google/common/primitives/Longs;->fromBytes(BBBBBBBB)J
move-result-wide v0
return-wide v0
.end method
.method public readShort()S
.locals 1
.annotation build Lcom/google/errorprone/annotations/CanIgnoreReturnValue;
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
invoke-virtual {p0}, Lcom/google/common/io/LittleEndianDataInputStream;->readUnsignedShort()I
move-result v0
int-to-short v0, v0
return v0
.end method
.method public readUTF()Ljava/lang/String;
.locals 2
.annotation build Lcom/google/errorprone/annotations/CanIgnoreReturnValue;
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
new-instance v0, Ljava/io/DataInputStream;
iget-object v1, p0, Ljava/io/FilterInputStream;->in:Ljava/io/InputStream;
invoke-direct {v0, v1}, Ljava/io/DataInputStream;-><init>(Ljava/io/InputStream;)V
invoke-virtual {v0}, Ljava/io/DataInputStream;->readUTF()Ljava/lang/String;
move-result-object v0
return-object v0
.end method
.method public readUnsignedByte()I
.locals 1
.annotation build Lcom/google/errorprone/annotations/CanIgnoreReturnValue;
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
iget-object v0, p0, Ljava/io/FilterInputStream;->in:Ljava/io/InputStream;
invoke-virtual {v0}, Ljava/io/InputStream;->read()I
move-result v0
if-ltz v0, :cond_0
return v0
.line 2
:cond_0
new-instance v0, Ljava/io/EOFException;
invoke-direct {v0}, Ljava/io/EOFException;-><init>()V
throw v0
.end method
.method public readUnsignedShort()I
.locals 3
.annotation build Lcom/google/errorprone/annotations/CanIgnoreReturnValue;
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
invoke-direct {p0}, Lcom/google/common/io/LittleEndianDataInputStream;->readAndCheckByte()B
move-result v0
.line 2
invoke-direct {p0}, Lcom/google/common/io/LittleEndianDataInputStream;->readAndCheckByte()B
move-result v1
const/4 v2, 0x0
.line 3
invoke-static {v2, v2, v1, v0}, Lcom/google/common/primitives/Ints;->fromBytes(BBBB)I
move-result v0
return v0
.end method
.method public skipBytes(I)I
.locals 3
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
iget-object v0, p0, Ljava/io/FilterInputStream;->in:Ljava/io/InputStream;
int-to-long v1, p1
invoke-virtual {v0, v1, v2}, Ljava/io/InputStream;->skip(J)J
move-result-wide v0
long-to-int p1, v0
return p1
.end method
@@ -0,0 +1,329 @@
.class public final Lcom/google/common/io/LittleEndianDataOutputStream;
.super Ljava/io/FilterOutputStream;
.source "LittleEndianDataOutputStream.java"
# interfaces
.implements Ljava/io/DataOutput;
# annotations
.annotation build Lcom/google/common/annotations/Beta;
.end annotation
.annotation build Lcom/google/common/annotations/GwtIncompatible;
.end annotation
.annotation runtime Lcom/google/common/io/ElementTypesAreNonnullByDefault;
.end annotation
# direct methods
.method public constructor <init>(Ljava/io/OutputStream;)V
.locals 1
.line 1
new-instance v0, Ljava/io/DataOutputStream;
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p1
check-cast p1, Ljava/io/OutputStream;
invoke-direct {v0, p1}, Ljava/io/DataOutputStream;-><init>(Ljava/io/OutputStream;)V
invoke-direct {p0, v0}, Ljava/io/FilterOutputStream;-><init>(Ljava/io/OutputStream;)V
return-void
.end method
# virtual methods
.method public close()V
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
iget-object v0, p0, Ljava/io/FilterOutputStream;->out:Ljava/io/OutputStream;
invoke-virtual {v0}, Ljava/io/OutputStream;->close()V
return-void
.end method
.method public write([BII)V
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
iget-object v0, p0, Ljava/io/FilterOutputStream;->out:Ljava/io/OutputStream;
invoke-virtual {v0, p1, p2, p3}, Ljava/io/OutputStream;->write([BII)V
return-void
.end method
.method public writeBoolean(Z)V
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
iget-object v0, p0, Ljava/io/FilterOutputStream;->out:Ljava/io/OutputStream;
check-cast v0, Ljava/io/DataOutputStream;
invoke-virtual {v0, p1}, Ljava/io/DataOutputStream;->writeBoolean(Z)V
return-void
.end method
.method public writeByte(I)V
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
iget-object v0, p0, Ljava/io/FilterOutputStream;->out:Ljava/io/OutputStream;
check-cast v0, Ljava/io/DataOutputStream;
invoke-virtual {v0, p1}, Ljava/io/DataOutputStream;->writeByte(I)V
return-void
.end method
.method public writeBytes(Ljava/lang/String;)V
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.annotation runtime Ljava/lang/Deprecated;
.end annotation
.line 1
iget-object v0, p0, Ljava/io/FilterOutputStream;->out:Ljava/io/OutputStream;
check-cast v0, Ljava/io/DataOutputStream;
invoke-virtual {v0, p1}, Ljava/io/DataOutputStream;->writeBytes(Ljava/lang/String;)V
return-void
.end method
.method public writeChar(I)V
.locals 0
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
invoke-virtual {p0, p1}, Lcom/google/common/io/LittleEndianDataOutputStream;->writeShort(I)V
return-void
.end method
.method public writeChars(Ljava/lang/String;)V
.locals 2
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
const/4 v0, 0x0
.line 1
:goto_0
invoke-virtual {p1}, Ljava/lang/String;->length()I
move-result v1
if-ge v0, v1, :cond_0
.line 2
invoke-virtual {p1, v0}, Ljava/lang/String;->charAt(I)C
move-result v1
invoke-virtual {p0, v1}, Lcom/google/common/io/LittleEndianDataOutputStream;->writeChar(I)V
add-int/lit8 v0, v0, 0x1
goto :goto_0
:cond_0
return-void
.end method
.method public writeDouble(D)V
.locals 0
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
invoke-static {p1, p2}, Ljava/lang/Double;->doubleToLongBits(D)J
move-result-wide p1
invoke-virtual {p0, p1, p2}, Lcom/google/common/io/LittleEndianDataOutputStream;->writeLong(J)V
return-void
.end method
.method public writeFloat(F)V
.locals 0
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
invoke-static {p1}, Ljava/lang/Float;->floatToIntBits(F)I
move-result p1
invoke-virtual {p0, p1}, Lcom/google/common/io/LittleEndianDataOutputStream;->writeInt(I)V
return-void
.end method
.method public writeInt(I)V
.locals 2
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
iget-object v0, p0, Ljava/io/FilterOutputStream;->out:Ljava/io/OutputStream;
and-int/lit16 v1, p1, 0xff
invoke-virtual {v0, v1}, Ljava/io/OutputStream;->write(I)V
.line 2
iget-object v0, p0, Ljava/io/FilterOutputStream;->out:Ljava/io/OutputStream;
shr-int/lit8 v1, p1, 0x8
and-int/lit16 v1, v1, 0xff
invoke-virtual {v0, v1}, Ljava/io/OutputStream;->write(I)V
.line 3
iget-object v0, p0, Ljava/io/FilterOutputStream;->out:Ljava/io/OutputStream;
shr-int/lit8 v1, p1, 0x10
and-int/lit16 v1, v1, 0xff
invoke-virtual {v0, v1}, Ljava/io/OutputStream;->write(I)V
.line 4
iget-object v0, p0, Ljava/io/FilterOutputStream;->out:Ljava/io/OutputStream;
shr-int/lit8 p1, p1, 0x18
and-int/lit16 p1, p1, 0xff
invoke-virtual {v0, p1}, Ljava/io/OutputStream;->write(I)V
return-void
.end method
.method public writeLong(J)V
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
invoke-static {p1, p2}, Ljava/lang/Long;->reverseBytes(J)J
move-result-wide p1
invoke-static {p1, p2}, Lcom/google/common/primitives/Longs;->toByteArray(J)[B
move-result-object p1
.line 2
array-length p2, p1
const/4 v0, 0x0
invoke-virtual {p0, p1, v0, p2}, Lcom/google/common/io/LittleEndianDataOutputStream;->write([BII)V
return-void
.end method
.method public writeShort(I)V
.locals 2
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
iget-object v0, p0, Ljava/io/FilterOutputStream;->out:Ljava/io/OutputStream;
and-int/lit16 v1, p1, 0xff
invoke-virtual {v0, v1}, Ljava/io/OutputStream;->write(I)V
.line 2
iget-object v0, p0, Ljava/io/FilterOutputStream;->out:Ljava/io/OutputStream;
shr-int/lit8 p1, p1, 0x8
and-int/lit16 p1, p1, 0xff
invoke-virtual {v0, p1}, Ljava/io/OutputStream;->write(I)V
return-void
.end method
.method public writeUTF(Ljava/lang/String;)V
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
iget-object v0, p0, Ljava/io/FilterOutputStream;->out:Ljava/io/OutputStream;
check-cast v0, Ljava/io/DataOutputStream;
invoke-virtual {v0, p1}, Ljava/io/DataOutputStream;->writeUTF(Ljava/lang/String;)V
return-void
.end method
@@ -0,0 +1,320 @@
.class final Lcom/google/common/io/MultiInputStream;
.super Ljava/io/InputStream;
.source "MultiInputStream.java"
# annotations
.annotation build Lcom/google/common/annotations/GwtIncompatible;
.end annotation
.annotation runtime Lcom/google/common/io/ElementTypesAreNonnullByDefault;
.end annotation
# instance fields
.field private in:Ljava/io/InputStream;
.annotation runtime Ljavax/annotation/CheckForNull;
.end annotation
.end field
.field private it:Ljava/util/Iterator;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/Iterator<",
"+",
"Lcom/google/common/io/ByteSource;",
">;"
}
.end annotation
.end field
# direct methods
.method public constructor <init>(Ljava/util/Iterator;)V
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/Iterator<",
"+",
"Lcom/google/common/io/ByteSource;",
">;)V"
}
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
invoke-direct {p0}, Ljava/io/InputStream;-><init>()V
.line 2
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p1
check-cast p1, Ljava/util/Iterator;
iput-object p1, p0, Lcom/google/common/io/MultiInputStream;->it:Ljava/util/Iterator;
.line 3
invoke-direct {p0}, Lcom/google/common/io/MultiInputStream;->advance()V
return-void
.end method
.method private advance()V
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
invoke-virtual {p0}, Lcom/google/common/io/MultiInputStream;->close()V
.line 2
iget-object v0, p0, Lcom/google/common/io/MultiInputStream;->it:Ljava/util/Iterator;
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v0
if-eqz v0, :cond_0
.line 3
iget-object v0, p0, Lcom/google/common/io/MultiInputStream;->it:Ljava/util/Iterator;
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/google/common/io/ByteSource;
invoke-virtual {v0}, Lcom/google/common/io/ByteSource;->openStream()Ljava/io/InputStream;
move-result-object v0
iput-object v0, p0, Lcom/google/common/io/MultiInputStream;->in:Ljava/io/InputStream;
:cond_0
return-void
.end method
# virtual methods
.method public available()I
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
iget-object v0, p0, Lcom/google/common/io/MultiInputStream;->in:Ljava/io/InputStream;
if-nez v0, :cond_0
const/4 v0, 0x0
return v0
.line 2
:cond_0
invoke-virtual {v0}, Ljava/io/InputStream;->available()I
move-result v0
return v0
.end method
.method public close()V
.locals 2
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
iget-object v0, p0, Lcom/google/common/io/MultiInputStream;->in:Ljava/io/InputStream;
if-eqz v0, :cond_0
const/4 v1, 0x0
.line 2
:try_start_0
invoke-virtual {v0}, Ljava/io/InputStream;->close()V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 3
iput-object v1, p0, Lcom/google/common/io/MultiInputStream;->in:Ljava/io/InputStream;
goto :goto_0
:catchall_0
move-exception v0
iput-object v1, p0, Lcom/google/common/io/MultiInputStream;->in:Ljava/io/InputStream;
.line 4
throw v0
:cond_0
:goto_0
return-void
.end method
.method public markSupported()Z
.locals 1
const/4 v0, 0x0
return v0
.end method
.method public read()I
.locals 2
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
:goto_0
iget-object v0, p0, Lcom/google/common/io/MultiInputStream;->in:Ljava/io/InputStream;
const/4 v1, -0x1
if-eqz v0, :cond_1
.line 2
invoke-virtual {v0}, Ljava/io/InputStream;->read()I
move-result v0
if-eq v0, v1, :cond_0
return v0
.line 3
:cond_0
invoke-direct {p0}, Lcom/google/common/io/MultiInputStream;->advance()V
goto :goto_0
:cond_1
return v1
.end method
.method public read([BII)I
.locals 2
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 4
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
.line 5
:goto_0
iget-object v0, p0, Lcom/google/common/io/MultiInputStream;->in:Ljava/io/InputStream;
const/4 v1, -0x1
if-eqz v0, :cond_1
.line 6
invoke-virtual {v0, p1, p2, p3}, Ljava/io/InputStream;->read([BII)I
move-result v0
if-eq v0, v1, :cond_0
return v0
.line 7
:cond_0
invoke-direct {p0}, Lcom/google/common/io/MultiInputStream;->advance()V
goto :goto_0
:cond_1
return v1
.end method
.method public skip(J)J
.locals 5
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
iget-object v0, p0, Lcom/google/common/io/MultiInputStream;->in:Ljava/io/InputStream;
const-wide/16 v1, 0x0
if-eqz v0, :cond_3
cmp-long v3, p1, v1
if-gtz v3, :cond_0
goto :goto_0
.line 2
:cond_0
invoke-virtual {v0, p1, p2}, Ljava/io/InputStream;->skip(J)J
move-result-wide v3
cmp-long v0, v3, v1
if-eqz v0, :cond_1
return-wide v3
.line 3
:cond_1
invoke-virtual {p0}, Lcom/google/common/io/MultiInputStream;->read()I
move-result v0
const/4 v3, -0x1
if-ne v0, v3, :cond_2
return-wide v1
.line 4
:cond_2
iget-object v0, p0, Lcom/google/common/io/MultiInputStream;->in:Ljava/io/InputStream;
const-wide/16 v1, 0x1
sub-long/2addr p1, v1
invoke-virtual {v0, p1, p2}, Ljava/io/InputStream;->skip(J)J
move-result-wide p1
add-long/2addr p1, v1
return-wide p1
:cond_3
:goto_0
return-wide v1
.end method
@@ -0,0 +1,269 @@
.class Lcom/google/common/io/MultiReader;
.super Ljava/io/Reader;
.source "MultiReader.java"
# annotations
.annotation build Lcom/google/common/annotations/GwtIncompatible;
.end annotation
.annotation runtime Lcom/google/common/io/ElementTypesAreNonnullByDefault;
.end annotation
# instance fields
.field private current:Ljava/io/Reader;
.annotation runtime Ljavax/annotation/CheckForNull;
.end annotation
.end field
.field private final it:Ljava/util/Iterator;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/Iterator<",
"+",
"Lcom/google/common/io/CharSource;",
">;"
}
.end annotation
.end field
# direct methods
.method public constructor <init>(Ljava/util/Iterator;)V
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/Iterator<",
"+",
"Lcom/google/common/io/CharSource;",
">;)V"
}
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
invoke-direct {p0}, Ljava/io/Reader;-><init>()V
.line 2
iput-object p1, p0, Lcom/google/common/io/MultiReader;->it:Ljava/util/Iterator;
.line 3
invoke-direct {p0}, Lcom/google/common/io/MultiReader;->advance()V
return-void
.end method
.method private advance()V
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
invoke-virtual {p0}, Lcom/google/common/io/MultiReader;->close()V
.line 2
iget-object v0, p0, Lcom/google/common/io/MultiReader;->it:Ljava/util/Iterator;
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v0
if-eqz v0, :cond_0
.line 3
iget-object v0, p0, Lcom/google/common/io/MultiReader;->it:Ljava/util/Iterator;
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/google/common/io/CharSource;
invoke-virtual {v0}, Lcom/google/common/io/CharSource;->openStream()Ljava/io/Reader;
move-result-object v0
iput-object v0, p0, Lcom/google/common/io/MultiReader;->current:Ljava/io/Reader;
:cond_0
return-void
.end method
# virtual methods
.method public close()V
.locals 2
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
iget-object v0, p0, Lcom/google/common/io/MultiReader;->current:Ljava/io/Reader;
if-eqz v0, :cond_0
const/4 v1, 0x0
.line 2
:try_start_0
invoke-virtual {v0}, Ljava/io/Reader;->close()V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 3
iput-object v1, p0, Lcom/google/common/io/MultiReader;->current:Ljava/io/Reader;
goto :goto_0
:catchall_0
move-exception v0
iput-object v1, p0, Lcom/google/common/io/MultiReader;->current:Ljava/io/Reader;
.line 4
throw v0
:cond_0
:goto_0
return-void
.end method
.method public read([CII)I
.locals 2
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
.line 2
iget-object v0, p0, Lcom/google/common/io/MultiReader;->current:Ljava/io/Reader;
const/4 v1, -0x1
if-nez v0, :cond_0
return v1
.line 3
:cond_0
invoke-virtual {v0, p1, p2, p3}, Ljava/io/Reader;->read([CII)I
move-result v0
if-ne v0, v1, :cond_1
.line 4
invoke-direct {p0}, Lcom/google/common/io/MultiReader;->advance()V
.line 5
invoke-virtual {p0, p1, p2, p3}, Lcom/google/common/io/MultiReader;->read([CII)I
move-result p1
return p1
:cond_1
return v0
.end method
.method public ready()Z
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
iget-object v0, p0, Lcom/google/common/io/MultiReader;->current:Ljava/io/Reader;
if-eqz v0, :cond_0
invoke-virtual {v0}, Ljava/io/Reader;->ready()Z
move-result v0
if-eqz v0, :cond_0
const/4 v0, 0x1
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
return v0
.end method
.method public skip(J)J
.locals 5
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
const-wide/16 v0, 0x0
cmp-long v2, p1, v0
if-ltz v2, :cond_0
const/4 v3, 0x1
goto :goto_0
:cond_0
const/4 v3, 0x0
:goto_0
const-string v4, "n is negative"
.line 1
invoke-static {v3, v4}, Lcom/google/common/base/Preconditions;->checkArgument(ZLjava/lang/Object;)V
if-lez v2, :cond_2
.line 2
:goto_1
iget-object v2, p0, Lcom/google/common/io/MultiReader;->current:Ljava/io/Reader;
if-eqz v2, :cond_2
.line 3
invoke-virtual {v2, p1, p2}, Ljava/io/Reader;->skip(J)J
move-result-wide v2
cmp-long v4, v2, v0
if-lez v4, :cond_1
return-wide v2
.line 4
:cond_1
invoke-direct {p0}, Lcom/google/common/io/MultiReader;->advance()V
goto :goto_1
:cond_2
return-wide v0
.end method
@@ -0,0 +1,30 @@
.class interface abstract annotation Lcom/google/common/io/ParametricNullness;
.super Ljava/lang/Object;
.source "ParametricNullness.java"
# interfaces
.implements Ljava/lang/annotation/Annotation;
# annotations
.annotation build Lcom/google/common/annotations/GwtCompatible;
.end annotation
.annotation runtime Ljava/lang/annotation/Retention;
value = .enum Ljava/lang/annotation/RetentionPolicy;->RUNTIME:Ljava/lang/annotation/RetentionPolicy;
.end annotation
.annotation runtime Ljava/lang/annotation/Target;
value = {
.enum Ljava/lang/annotation/ElementType;->FIELD:Ljava/lang/annotation/ElementType;,
.enum Ljava/lang/annotation/ElementType;->METHOD:Ljava/lang/annotation/ElementType;,
.enum Ljava/lang/annotation/ElementType;->PARAMETER:Ljava/lang/annotation/ElementType;
}
.end annotation
.annotation runtime Ljavax/annotation/Nonnull;
when = .enum Ljavax/annotation/meta/When;->UNKNOWN:Ljavax/annotation/meta/When;
.end annotation
.annotation build Ljavax/annotation/meta/TypeQualifierNickname;
.end annotation
@@ -0,0 +1,73 @@
.class public final Lcom/google/common/io/PatternFilenameFilter;
.super Ljava/lang/Object;
.source "PatternFilenameFilter.java"
# interfaces
.implements Ljava/io/FilenameFilter;
# annotations
.annotation build Lcom/google/common/annotations/Beta;
.end annotation
.annotation build Lcom/google/common/annotations/GwtIncompatible;
.end annotation
.annotation runtime Lcom/google/common/io/ElementTypesAreNonnullByDefault;
.end annotation
# instance fields
.field private final pattern:Ljava/util/regex/Pattern;
# direct methods
.method public constructor <init>(Ljava/lang/String;)V
.locals 0
.line 1
invoke-static {p1}, Ljava/util/regex/Pattern;->compile(Ljava/lang/String;)Ljava/util/regex/Pattern;
move-result-object p1
invoke-direct {p0, p1}, Lcom/google/common/io/PatternFilenameFilter;-><init>(Ljava/util/regex/Pattern;)V
return-void
.end method
.method public constructor <init>(Ljava/util/regex/Pattern;)V
.locals 0
.line 2
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 3
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p1
check-cast p1, Ljava/util/regex/Pattern;
iput-object p1, p0, Lcom/google/common/io/PatternFilenameFilter;->pattern:Ljava/util/regex/Pattern;
return-void
.end method
# virtual methods
.method public accept(Ljava/io/File;Ljava/lang/String;)Z
.locals 0
.line 1
iget-object p1, p0, Lcom/google/common/io/PatternFilenameFilter;->pattern:Ljava/util/regex/Pattern;
invoke-virtual {p1, p2}, Ljava/util/regex/Pattern;->matcher(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;
move-result-object p1
invoke-virtual {p1}, Ljava/util/regex/Matcher;->matches()Z
move-result p1
return p1
.end method
@@ -0,0 +1,584 @@
.class final Lcom/google/common/io/ReaderInputStream;
.super Ljava/io/InputStream;
.source "ReaderInputStream.java"
# annotations
.annotation build Lcom/google/common/annotations/GwtIncompatible;
.end annotation
.annotation runtime Lcom/google/common/io/ElementTypesAreNonnullByDefault;
.end annotation
# instance fields
.field private byteBuffer:Ljava/nio/ByteBuffer;
.field private charBuffer:Ljava/nio/CharBuffer;
.field private doneFlushing:Z
.field private draining:Z
.field private final encoder:Ljava/nio/charset/CharsetEncoder;
.field private endOfInput:Z
.field private final reader:Ljava/io/Reader;
.field private final singleByte:[B
# direct methods
.method public constructor <init>(Ljava/io/Reader;Ljava/nio/charset/Charset;I)V
.locals 1
.line 1
invoke-virtual {p2}, Ljava/nio/charset/Charset;->newEncoder()Ljava/nio/charset/CharsetEncoder;
move-result-object p2
sget-object v0, Ljava/nio/charset/CodingErrorAction;->REPLACE:Ljava/nio/charset/CodingErrorAction;
.line 2
invoke-virtual {p2, v0}, Ljava/nio/charset/CharsetEncoder;->onMalformedInput(Ljava/nio/charset/CodingErrorAction;)Ljava/nio/charset/CharsetEncoder;
move-result-object p2
sget-object v0, Ljava/nio/charset/CodingErrorAction;->REPLACE:Ljava/nio/charset/CodingErrorAction;
.line 3
invoke-virtual {p2, v0}, Ljava/nio/charset/CharsetEncoder;->onUnmappableCharacter(Ljava/nio/charset/CodingErrorAction;)Ljava/nio/charset/CharsetEncoder;
move-result-object p2
.line 4
invoke-direct {p0, p1, p2, p3}, Lcom/google/common/io/ReaderInputStream;-><init>(Ljava/io/Reader;Ljava/nio/charset/CharsetEncoder;I)V
return-void
.end method
.method public constructor <init>(Ljava/io/Reader;Ljava/nio/charset/CharsetEncoder;I)V
.locals 2
.line 5
invoke-direct {p0}, Ljava/io/InputStream;-><init>()V
const/4 v0, 0x1
new-array v1, v0, [B
.line 6
iput-object v1, p0, Lcom/google/common/io/ReaderInputStream;->singleByte:[B
.line 7
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p1
check-cast p1, Ljava/io/Reader;
iput-object p1, p0, Lcom/google/common/io/ReaderInputStream;->reader:Ljava/io/Reader;
.line 8
invoke-static {p2}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p1
check-cast p1, Ljava/nio/charset/CharsetEncoder;
iput-object p1, p0, Lcom/google/common/io/ReaderInputStream;->encoder:Ljava/nio/charset/CharsetEncoder;
if-lez p3, :cond_0
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
const-string p1, "bufferSize must be positive: %s"
.line 9
invoke-static {v0, p1, p3}, Lcom/google/common/base/Preconditions;->checkArgument(ZLjava/lang/String;I)V
.line 10
invoke-virtual {p2}, Ljava/nio/charset/CharsetEncoder;->reset()Ljava/nio/charset/CharsetEncoder;
.line 11
invoke-static {p3}, Ljava/nio/CharBuffer;->allocate(I)Ljava/nio/CharBuffer;
move-result-object p1
iput-object p1, p0, Lcom/google/common/io/ReaderInputStream;->charBuffer:Ljava/nio/CharBuffer;
.line 12
invoke-static {p1}, Lcom/google/common/io/Java8Compatibility;->flip(Ljava/nio/Buffer;)V
.line 13
invoke-static {p3}, Ljava/nio/ByteBuffer;->allocate(I)Ljava/nio/ByteBuffer;
move-result-object p1
iput-object p1, p0, Lcom/google/common/io/ReaderInputStream;->byteBuffer:Ljava/nio/ByteBuffer;
return-void
.end method
.method private static availableCapacity(Ljava/nio/Buffer;)I
.locals 1
.line 1
invoke-virtual {p0}, Ljava/nio/Buffer;->capacity()I
move-result v0
invoke-virtual {p0}, Ljava/nio/Buffer;->limit()I
move-result p0
sub-int/2addr v0, p0
return v0
.end method
.method private drain([BII)I
.locals 1
.line 1
iget-object v0, p0, Lcom/google/common/io/ReaderInputStream;->byteBuffer:Ljava/nio/ByteBuffer;
invoke-virtual {v0}, Ljava/nio/ByteBuffer;->remaining()I
move-result v0
invoke-static {p3, v0}, Ljava/lang/Math;->min(II)I
move-result p3
.line 2
iget-object v0, p0, Lcom/google/common/io/ReaderInputStream;->byteBuffer:Ljava/nio/ByteBuffer;
invoke-virtual {v0, p1, p2, p3}, Ljava/nio/ByteBuffer;->get([BII)Ljava/nio/ByteBuffer;
return p3
.end method
.method private static grow(Ljava/nio/CharBuffer;)Ljava/nio/CharBuffer;
.locals 2
.line 1
invoke-virtual {p0}, Ljava/nio/CharBuffer;->array()[C
move-result-object v0
invoke-virtual {p0}, Ljava/nio/CharBuffer;->capacity()I
move-result v1
mul-int/lit8 v1, v1, 0x2
invoke-static {v0, v1}, Ljava/util/Arrays;->copyOf([CI)[C
move-result-object v0
.line 2
invoke-static {v0}, Ljava/nio/CharBuffer;->wrap([C)Ljava/nio/CharBuffer;
move-result-object v0
.line 3
invoke-virtual {p0}, Ljava/nio/CharBuffer;->position()I
move-result v1
invoke-static {v0, v1}, Lcom/google/common/io/Java8Compatibility;->position(Ljava/nio/Buffer;I)V
.line 4
invoke-virtual {p0}, Ljava/nio/CharBuffer;->limit()I
move-result p0
invoke-static {v0, p0}, Lcom/google/common/io/Java8Compatibility;->limit(Ljava/nio/Buffer;I)V
return-object v0
.end method
.method private readMoreChars()V
.locals 4
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
iget-object v0, p0, Lcom/google/common/io/ReaderInputStream;->charBuffer:Ljava/nio/CharBuffer;
invoke-static {v0}, Lcom/google/common/io/ReaderInputStream;->availableCapacity(Ljava/nio/Buffer;)I
move-result v0
if-nez v0, :cond_1
.line 2
iget-object v0, p0, Lcom/google/common/io/ReaderInputStream;->charBuffer:Ljava/nio/CharBuffer;
invoke-virtual {v0}, Ljava/nio/CharBuffer;->position()I
move-result v0
if-lez v0, :cond_0
.line 3
iget-object v0, p0, Lcom/google/common/io/ReaderInputStream;->charBuffer:Ljava/nio/CharBuffer;
invoke-virtual {v0}, Ljava/nio/CharBuffer;->compact()Ljava/nio/CharBuffer;
move-result-object v0
invoke-static {v0}, Lcom/google/common/io/Java8Compatibility;->flip(Ljava/nio/Buffer;)V
goto :goto_0
.line 4
:cond_0
iget-object v0, p0, Lcom/google/common/io/ReaderInputStream;->charBuffer:Ljava/nio/CharBuffer;
invoke-static {v0}, Lcom/google/common/io/ReaderInputStream;->grow(Ljava/nio/CharBuffer;)Ljava/nio/CharBuffer;
move-result-object v0
iput-object v0, p0, Lcom/google/common/io/ReaderInputStream;->charBuffer:Ljava/nio/CharBuffer;
.line 5
:cond_1
:goto_0
iget-object v0, p0, Lcom/google/common/io/ReaderInputStream;->charBuffer:Ljava/nio/CharBuffer;
invoke-virtual {v0}, Ljava/nio/CharBuffer;->limit()I
move-result v0
.line 6
iget-object v1, p0, Lcom/google/common/io/ReaderInputStream;->reader:Ljava/io/Reader;
iget-object v2, p0, Lcom/google/common/io/ReaderInputStream;->charBuffer:Ljava/nio/CharBuffer;
invoke-virtual {v2}, Ljava/nio/CharBuffer;->array()[C
move-result-object v2
iget-object v3, p0, Lcom/google/common/io/ReaderInputStream;->charBuffer:Ljava/nio/CharBuffer;
invoke-static {v3}, Lcom/google/common/io/ReaderInputStream;->availableCapacity(Ljava/nio/Buffer;)I
move-result v3
invoke-virtual {v1, v2, v0, v3}, Ljava/io/Reader;->read([CII)I
move-result v1
const/4 v2, -0x1
if-ne v1, v2, :cond_2
const/4 v0, 0x1
.line 7
iput-boolean v0, p0, Lcom/google/common/io/ReaderInputStream;->endOfInput:Z
goto :goto_1
.line 8
:cond_2
iget-object v2, p0, Lcom/google/common/io/ReaderInputStream;->charBuffer:Ljava/nio/CharBuffer;
add-int/2addr v0, v1
invoke-static {v2, v0}, Lcom/google/common/io/Java8Compatibility;->limit(Ljava/nio/Buffer;I)V
:goto_1
return-void
.end method
.method private startDraining(Z)V
.locals 1
.line 1
iget-object v0, p0, Lcom/google/common/io/ReaderInputStream;->byteBuffer:Ljava/nio/ByteBuffer;
invoke-static {v0}, Lcom/google/common/io/Java8Compatibility;->flip(Ljava/nio/Buffer;)V
if-eqz p1, :cond_0
.line 2
iget-object p1, p0, Lcom/google/common/io/ReaderInputStream;->byteBuffer:Ljava/nio/ByteBuffer;
invoke-virtual {p1}, Ljava/nio/ByteBuffer;->remaining()I
move-result p1
if-nez p1, :cond_0
.line 3
iget-object p1, p0, Lcom/google/common/io/ReaderInputStream;->byteBuffer:Ljava/nio/ByteBuffer;
invoke-virtual {p1}, Ljava/nio/ByteBuffer;->capacity()I
move-result p1
mul-int/lit8 p1, p1, 0x2
invoke-static {p1}, Ljava/nio/ByteBuffer;->allocate(I)Ljava/nio/ByteBuffer;
move-result-object p1
iput-object p1, p0, Lcom/google/common/io/ReaderInputStream;->byteBuffer:Ljava/nio/ByteBuffer;
goto :goto_0
:cond_0
const/4 p1, 0x1
.line 4
iput-boolean p1, p0, Lcom/google/common/io/ReaderInputStream;->draining:Z
:goto_0
return-void
.end method
# virtual methods
.method public close()V
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
iget-object v0, p0, Lcom/google/common/io/ReaderInputStream;->reader:Ljava/io/Reader;
invoke-virtual {v0}, Ljava/io/Reader;->close()V
return-void
.end method
.method public read()I
.locals 2
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
iget-object v0, p0, Lcom/google/common/io/ReaderInputStream;->singleByte:[B
invoke-virtual {p0, v0}, Ljava/io/InputStream;->read([B)I
move-result v0
const/4 v1, 0x1
if-ne v0, v1, :cond_0
iget-object v0, p0, Lcom/google/common/io/ReaderInputStream;->singleByte:[B
const/4 v1, 0x0
aget-byte v0, v0, v1
invoke-static {v0}, Lcom/google/common/primitives/UnsignedBytes;->toInt(B)I
move-result v0
goto :goto_0
:cond_0
const/4 v0, -0x1
:goto_0
return v0
.end method
.method public read([BII)I
.locals 7
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
add-int v0, p2, p3
.line 2
array-length v1, p1
invoke-static {p2, v0, v1}, Lcom/google/common/base/Preconditions;->checkPositionIndexes(III)V
const/4 v0, 0x0
if-nez p3, :cond_0
return v0
.line 3
:cond_0
iget-boolean v1, p0, Lcom/google/common/io/ReaderInputStream;->endOfInput:Z
move v2, v0
.line 4
:goto_0
iget-boolean v3, p0, Lcom/google/common/io/ReaderInputStream;->draining:Z
if-eqz v3, :cond_4
add-int v3, p2, v2
sub-int v4, p3, v2
.line 5
invoke-direct {p0, p1, v3, v4}, Lcom/google/common/io/ReaderInputStream;->drain([BII)I
move-result v3
add-int/2addr v2, v3
if-eq v2, p3, :cond_2
.line 6
iget-boolean v3, p0, Lcom/google/common/io/ReaderInputStream;->doneFlushing:Z
if-eqz v3, :cond_1
goto :goto_1
.line 7
:cond_1
iput-boolean v0, p0, Lcom/google/common/io/ReaderInputStream;->draining:Z
.line 8
iget-object v3, p0, Lcom/google/common/io/ReaderInputStream;->byteBuffer:Ljava/nio/ByteBuffer;
invoke-static {v3}, Lcom/google/common/io/Java8Compatibility;->clear(Ljava/nio/Buffer;)V
goto :goto_3
:cond_2
:goto_1
if-lez v2, :cond_3
goto :goto_2
:cond_3
const/4 v2, -0x1
:goto_2
return v2
.line 9
:cond_4
:goto_3
iget-boolean v3, p0, Lcom/google/common/io/ReaderInputStream;->doneFlushing:Z
if-eqz v3, :cond_5
.line 10
sget-object v3, Ljava/nio/charset/CoderResult;->UNDERFLOW:Ljava/nio/charset/CoderResult;
goto :goto_4
:cond_5
if-eqz v1, :cond_6
.line 11
iget-object v3, p0, Lcom/google/common/io/ReaderInputStream;->encoder:Ljava/nio/charset/CharsetEncoder;
iget-object v4, p0, Lcom/google/common/io/ReaderInputStream;->byteBuffer:Ljava/nio/ByteBuffer;
invoke-virtual {v3, v4}, Ljava/nio/charset/CharsetEncoder;->flush(Ljava/nio/ByteBuffer;)Ljava/nio/charset/CoderResult;
move-result-object v3
goto :goto_4
.line 12
:cond_6
iget-object v3, p0, Lcom/google/common/io/ReaderInputStream;->encoder:Ljava/nio/charset/CharsetEncoder;
iget-object v4, p0, Lcom/google/common/io/ReaderInputStream;->charBuffer:Ljava/nio/CharBuffer;
iget-object v5, p0, Lcom/google/common/io/ReaderInputStream;->byteBuffer:Ljava/nio/ByteBuffer;
iget-boolean v6, p0, Lcom/google/common/io/ReaderInputStream;->endOfInput:Z
invoke-virtual {v3, v4, v5, v6}, Ljava/nio/charset/CharsetEncoder;->encode(Ljava/nio/CharBuffer;Ljava/nio/ByteBuffer;Z)Ljava/nio/charset/CoderResult;
move-result-object v3
.line 13
:goto_4
invoke-virtual {v3}, Ljava/nio/charset/CoderResult;->isOverflow()Z
move-result v4
const/4 v5, 0x1
if-eqz v4, :cond_7
.line 14
invoke-direct {p0, v5}, Lcom/google/common/io/ReaderInputStream;->startDraining(Z)V
goto :goto_0
.line 15
:cond_7
invoke-virtual {v3}, Ljava/nio/charset/CoderResult;->isUnderflow()Z
move-result v4
if-eqz v4, :cond_a
if-eqz v1, :cond_8
.line 16
iput-boolean v5, p0, Lcom/google/common/io/ReaderInputStream;->doneFlushing:Z
.line 17
invoke-direct {p0, v0}, Lcom/google/common/io/ReaderInputStream;->startDraining(Z)V
goto :goto_0
.line 18
:cond_8
iget-boolean v3, p0, Lcom/google/common/io/ReaderInputStream;->endOfInput:Z
if-eqz v3, :cond_9
move v1, v5
goto :goto_3
.line 19
:cond_9
invoke-direct {p0}, Lcom/google/common/io/ReaderInputStream;->readMoreChars()V
goto :goto_3
.line 20
:cond_a
invoke-virtual {v3}, Ljava/nio/charset/CoderResult;->isError()Z
move-result v4
if-eqz v4, :cond_4
.line 21
invoke-virtual {v3}, Ljava/nio/charset/CoderResult;->throwException()V
return v0
.end method
@@ -0,0 +1,100 @@
.class Lcom/google/common/io/Resources$1;
.super Ljava/lang/Object;
.source "Resources.java"
# interfaces
.implements Lcom/google/common/io/LineProcessor;
# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
value = Lcom/google/common/io/Resources;->readLines(Ljava/net/URL;Ljava/nio/charset/Charset;)Ljava/util/List;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1
name = null
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/lang/Object;",
"Lcom/google/common/io/LineProcessor<",
"Ljava/util/List<",
"Ljava/lang/String;",
">;>;"
}
.end annotation
# instance fields
.field public final result:Ljava/util/List;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/List<",
"Ljava/lang/String;",
">;"
}
.end annotation
.end field
# direct methods
.method public constructor <init>()V
.locals 1
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 2
invoke-static {}, Lcom/google/common/collect/Lists;->newArrayList()Ljava/util/ArrayList;
move-result-object v0
iput-object v0, p0, Lcom/google/common/io/Resources$1;->result:Ljava/util/List;
return-void
.end method
# virtual methods
.method public bridge synthetic getResult()Ljava/lang/Object;
.locals 1
.line 1
invoke-virtual {p0}, Lcom/google/common/io/Resources$1;->getResult()Ljava/util/List;
move-result-object v0
return-object v0
.end method
.method public getResult()Ljava/util/List;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Ljava/util/List<",
"Ljava/lang/String;",
">;"
}
.end annotation
.line 2
iget-object v0, p0, Lcom/google/common/io/Resources$1;->result:Ljava/util/List;
return-object v0
.end method
.method public processLine(Ljava/lang/String;)Z
.locals 1
.line 1
iget-object v0, p0, Lcom/google/common/io/Resources$1;->result:Ljava/util/List;
invoke-interface {v0, p1}, Ljava/util/List;->add(Ljava/lang/Object;)Z
const/4 p1, 0x1
return p1
.end method
@@ -0,0 +1,94 @@
.class final Lcom/google/common/io/Resources$UrlByteSource;
.super Lcom/google/common/io/ByteSource;
.source "Resources.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/google/common/io/Resources;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = "UrlByteSource"
.end annotation
# instance fields
.field private final url:Ljava/net/URL;
# direct methods
.method private constructor <init>(Ljava/net/URL;)V
.locals 0
.line 2
invoke-direct {p0}, Lcom/google/common/io/ByteSource;-><init>()V
.line 3
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p1
check-cast p1, Ljava/net/URL;
iput-object p1, p0, Lcom/google/common/io/Resources$UrlByteSource;->url:Ljava/net/URL;
return-void
.end method
.method public synthetic constructor <init>(Ljava/net/URL;Lcom/google/common/io/Resources$1;)V
.locals 0
.line 1
invoke-direct {p0, p1}, Lcom/google/common/io/Resources$UrlByteSource;-><init>(Ljava/net/URL;)V
return-void
.end method
# virtual methods
.method public openStream()Ljava/io/InputStream;
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
iget-object v0, p0, Lcom/google/common/io/Resources$UrlByteSource;->url:Ljava/net/URL;
invoke-virtual {v0}, Ljava/net/URL;->openStream()Ljava/io/InputStream;
move-result-object v0
return-object v0
.end method
.method public toString()Ljava/lang/String;
.locals 4
.line 1
iget-object v0, p0, Lcom/google/common/io/Resources$UrlByteSource;->url:Ljava/net/URL;
invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/String;->length()I
move-result v1
add-int/lit8 v1, v1, 0x18
const-string v2, "Resources.asByteSource("
const-string v3, ")"
invoke-static {v1, v2, v0, v3}, Lcom/google/android/gms/ads/internal/a;->a(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
return-object v0
.end method
@@ -0,0 +1,283 @@
.class public final Lcom/google/common/io/Resources;
.super Ljava/lang/Object;
.source "Resources.java"
# annotations
.annotation build Lcom/google/common/annotations/Beta;
.end annotation
.annotation build Lcom/google/common/annotations/GwtIncompatible;
.end annotation
.annotation runtime Lcom/google/common/io/ElementTypesAreNonnullByDefault;
.end annotation
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/google/common/io/Resources$UrlByteSource;
}
.end annotation
# direct methods
.method private constructor <init>()V
.locals 0
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static asByteSource(Ljava/net/URL;)Lcom/google/common/io/ByteSource;
.locals 2
.line 1
new-instance v0, Lcom/google/common/io/Resources$UrlByteSource;
const/4 v1, 0x0
invoke-direct {v0, p0, v1}, Lcom/google/common/io/Resources$UrlByteSource;-><init>(Ljava/net/URL;Lcom/google/common/io/Resources$1;)V
return-object v0
.end method
.method public static asCharSource(Ljava/net/URL;Ljava/nio/charset/Charset;)Lcom/google/common/io/CharSource;
.locals 0
.line 1
invoke-static {p0}, Lcom/google/common/io/Resources;->asByteSource(Ljava/net/URL;)Lcom/google/common/io/ByteSource;
move-result-object p0
invoke-virtual {p0, p1}, Lcom/google/common/io/ByteSource;->asCharSource(Ljava/nio/charset/Charset;)Lcom/google/common/io/CharSource;
move-result-object p0
return-object p0
.end method
.method public static copy(Ljava/net/URL;Ljava/io/OutputStream;)V
.locals 0
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
invoke-static {p0}, Lcom/google/common/io/Resources;->asByteSource(Ljava/net/URL;)Lcom/google/common/io/ByteSource;
move-result-object p0
invoke-virtual {p0, p1}, Lcom/google/common/io/ByteSource;->copyTo(Ljava/io/OutputStream;)J
return-void
.end method
.method public static getResource(Ljava/lang/Class;Ljava/lang/String;)Ljava/net/URL;
.locals 3
.annotation build Lcom/google/errorprone/annotations/CanIgnoreReturnValue;
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/Class<",
"*>;",
"Ljava/lang/String;",
")",
"Ljava/net/URL;"
}
.end annotation
.line 5
invoke-virtual {p0, p1}, Ljava/lang/Class;->getResource(Ljava/lang/String;)Ljava/net/URL;
move-result-object v0
if-eqz v0, :cond_0
const/4 v1, 0x1
goto :goto_0
:cond_0
const/4 v1, 0x0
.line 6
:goto_0
invoke-virtual {p0}, Ljava/lang/Class;->getName()Ljava/lang/String;
move-result-object p0
const-string v2, "resource %s relative to %s not found."
.line 7
invoke-static {v1, v2, p1, p0}, Lcom/google/common/base/Preconditions;->checkArgument(ZLjava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V
return-object v0
.end method
.method public static getResource(Ljava/lang/String;)Ljava/net/URL;
.locals 3
.annotation build Lcom/google/errorprone/annotations/CanIgnoreReturnValue;
.end annotation
.line 1
invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/Thread;->getContextClassLoader()Ljava/lang/ClassLoader;
move-result-object v0
const-class v1, Lcom/google/common/io/Resources;
invoke-virtual {v1}, Ljava/lang/Class;->getClassLoader()Ljava/lang/ClassLoader;
move-result-object v1
.line 2
invoke-static {v0, v1}, Lcom/google/common/base/MoreObjects;->firstNonNull(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/lang/ClassLoader;
.line 3
invoke-virtual {v0, p0}, Ljava/lang/ClassLoader;->getResource(Ljava/lang/String;)Ljava/net/URL;
move-result-object v0
if-eqz v0, :cond_0
const/4 v1, 0x1
goto :goto_0
:cond_0
const/4 v1, 0x0
:goto_0
const-string v2, "resource %s not found."
.line 4
invoke-static {v1, v2, p0}, Lcom/google/common/base/Preconditions;->checkArgument(ZLjava/lang/String;Ljava/lang/Object;)V
return-object v0
.end method
.method public static readLines(Ljava/net/URL;Ljava/nio/charset/Charset;Lcom/google/common/io/LineProcessor;)Ljava/lang/Object;
.locals 0
.annotation runtime Lcom/google/common/io/ParametricNullness;
.end annotation
.annotation build Lcom/google/errorprone/annotations/CanIgnoreReturnValue;
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">(",
"Ljava/net/URL;",
"Ljava/nio/charset/Charset;",
"Lcom/google/common/io/LineProcessor<",
"TT;>;)TT;"
}
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
invoke-static {p0, p1}, Lcom/google/common/io/Resources;->asCharSource(Ljava/net/URL;Ljava/nio/charset/Charset;)Lcom/google/common/io/CharSource;
move-result-object p0
invoke-virtual {p0, p2}, Lcom/google/common/io/CharSource;->readLines(Lcom/google/common/io/LineProcessor;)Ljava/lang/Object;
move-result-object p0
return-object p0
.end method
.method public static readLines(Ljava/net/URL;Ljava/nio/charset/Charset;)Ljava/util/List;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/net/URL;",
"Ljava/nio/charset/Charset;",
")",
"Ljava/util/List<",
"Ljava/lang/String;",
">;"
}
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 2
new-instance v0, Lcom/google/common/io/Resources$1;
invoke-direct {v0}, Lcom/google/common/io/Resources$1;-><init>()V
invoke-static {p0, p1, v0}, Lcom/google/common/io/Resources;->readLines(Ljava/net/URL;Ljava/nio/charset/Charset;Lcom/google/common/io/LineProcessor;)Ljava/lang/Object;
move-result-object p0
check-cast p0, Ljava/util/List;
return-object p0
.end method
.method public static toByteArray(Ljava/net/URL;)[B
.locals 0
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
invoke-static {p0}, Lcom/google/common/io/Resources;->asByteSource(Ljava/net/URL;)Lcom/google/common/io/ByteSource;
move-result-object p0
invoke-virtual {p0}, Lcom/google/common/io/ByteSource;->read()[B
move-result-object p0
return-object p0
.end method
.method public static toString(Ljava/net/URL;Ljava/nio/charset/Charset;)Ljava/lang/String;
.locals 0
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
invoke-static {p0, p1}, Lcom/google/common/io/Resources;->asCharSource(Ljava/net/URL;Ljava/nio/charset/Charset;)Lcom/google/common/io/CharSource;
move-result-object p0
invoke-virtual {p0}, Lcom/google/common/io/CharSource;->read()Ljava/lang/String;
move-result-object p0
return-object p0
.end method
@@ -0,0 +1,11 @@
.class interface abstract synthetic Lcom/google/common/io/package-info;
.super Ljava/lang/Object;
.source "package-info.java"
# annotations
.annotation runtime Lcom/google/errorprone/annotations/CheckReturnValue;
.end annotation
.annotation runtime Ljavax/annotation/ParametersAreNonnullByDefault;
.end annotation