2019-02-04 20:08:30 +00:00
|
|
|
.class public final Lokio/j;
|
|
|
|
.super Ljava/lang/Object;
|
2019-02-04 20:29:01 +00:00
|
|
|
.source "Okio.java"
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
|
|
|
|
# static fields
|
|
|
|
.field static final logger:Ljava/util/logging/Logger;
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method static constructor <clinit>()V
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
const-class v0, Lokio/j;
|
|
|
|
|
|
|
|
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, Lokio/j;->logger:Ljava/util/logging/Logger;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private constructor <init>()V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
2019-02-27 21:13:14 +00:00
|
|
|
.method public static B(Ljava/io/File;)Lokio/q;
|
2019-02-04 20:08:30 +00:00
|
|
|
.locals 1
|
|
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
|
|
value = {
|
|
|
|
Ljava/io/FileNotFoundException;
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
if-eqz p0, :cond_0
|
|
|
|
|
|
|
|
new-instance v0, Ljava/io/FileInputStream;
|
|
|
|
|
|
|
|
invoke-direct {v0, p0}, Ljava/io/FileInputStream;-><init>(Ljava/io/File;)V
|
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
invoke-static {v0}, Lokio/j;->v(Ljava/io/InputStream;)Lokio/q;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
new-instance p0, Ljava/lang/IllegalArgumentException;
|
|
|
|
|
|
|
|
const-string v0, "file == null"
|
|
|
|
|
|
|
|
invoke-direct {p0, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
throw p0
|
|
|
|
.end method
|
|
|
|
|
2019-02-27 21:13:14 +00:00
|
|
|
.method private static a(Ljava/io/OutputStream;Lokio/r;)Lokio/p;
|
2019-02-04 20:08:30 +00:00
|
|
|
.locals 1
|
|
|
|
|
|
|
|
if-eqz p0, :cond_1
|
|
|
|
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
|
|
|
|
new-instance v0, Lokio/j$1;
|
|
|
|
|
2019-02-27 21:13:14 +00:00
|
|
|
invoke-direct {v0, p1, p0}, Lokio/j$1;-><init>(Lokio/r;Ljava/io/OutputStream;)V
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
return-object v0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
new-instance p0, Ljava/lang/IllegalArgumentException;
|
|
|
|
|
|
|
|
const-string p1, "timeout == null"
|
|
|
|
|
|
|
|
invoke-direct {p0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
throw p0
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
new-instance p0, Ljava/lang/IllegalArgumentException;
|
|
|
|
|
|
|
|
const-string p1, "out == null"
|
|
|
|
|
|
|
|
invoke-direct {p0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
throw p0
|
|
|
|
.end method
|
|
|
|
|
2019-02-27 21:13:14 +00:00
|
|
|
.method private static a(Ljava/io/InputStream;Lokio/r;)Lokio/q;
|
2019-02-04 20:08:30 +00:00
|
|
|
.locals 1
|
|
|
|
|
|
|
|
if-eqz p0, :cond_1
|
|
|
|
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
|
|
|
|
new-instance v0, Lokio/j$2;
|
|
|
|
|
2019-02-27 21:13:14 +00:00
|
|
|
invoke-direct {v0, p1, p0}, Lokio/j$2;-><init>(Lokio/r;Ljava/io/InputStream;)V
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
return-object v0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
new-instance p0, Ljava/lang/IllegalArgumentException;
|
|
|
|
|
|
|
|
const-string p1, "timeout == null"
|
|
|
|
|
|
|
|
invoke-direct {p0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
throw p0
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
new-instance p0, Ljava/lang/IllegalArgumentException;
|
|
|
|
|
|
|
|
const-string p1, "in == null"
|
|
|
|
|
|
|
|
invoke-direct {p0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
throw p0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method static a(Ljava/lang/AssertionError;)Z
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Ljava/lang/AssertionError;->getCause()Ljava/lang/Throwable;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Ljava/lang/AssertionError;->getMessage()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Ljava/lang/AssertionError;->getMessage()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
const-string v0, "getsockname failed"
|
|
|
|
|
|
|
|
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
|
|
|
|
|
|
|
|
move-result p0
|
|
|
|
|
|
|
|
if-eqz p0, :cond_0
|
|
|
|
|
|
|
|
const/4 p0, 0x1
|
|
|
|
|
|
|
|
return p0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const/4 p0, 0x0
|
|
|
|
|
|
|
|
return p0
|
|
|
|
.end method
|
|
|
|
|
2019-02-27 21:13:14 +00:00
|
|
|
.method public static b(Lokio/p;)Lokio/BufferedSink;
|
2019-02-04 20:08:30 +00:00
|
|
|
.locals 1
|
|
|
|
|
2019-02-27 21:13:14 +00:00
|
|
|
new-instance v0, Lokio/k;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-02-27 21:13:14 +00:00
|
|
|
invoke-direct {v0, p0}, Lokio/k;-><init>(Lokio/p;)V
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
2019-02-27 21:13:14 +00:00
|
|
|
.method public static b(Lokio/q;)Lokio/d;
|
2019-02-04 20:08:30 +00:00
|
|
|
.locals 1
|
|
|
|
|
2019-02-27 21:13:14 +00:00
|
|
|
new-instance v0, Lokio/l;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-02-27 21:13:14 +00:00
|
|
|
invoke-direct {v0, p0}, Lokio/l;-><init>(Lokio/q;)V
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
2019-02-27 21:13:14 +00:00
|
|
|
.method public static b(Ljava/io/OutputStream;)Lokio/p;
|
2019-02-04 20:08:30 +00:00
|
|
|
.locals 1
|
|
|
|
|
2019-02-27 21:13:14 +00:00
|
|
|
new-instance v0, Lokio/r;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-02-27 21:13:14 +00:00
|
|
|
invoke-direct {v0}, Lokio/r;-><init>()V
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-02-27 21:13:14 +00:00
|
|
|
invoke-static {p0, v0}, Lokio/j;->a(Ljava/io/OutputStream;Lokio/r;)Lokio/p;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
.end method
|
|
|
|
|
2019-02-27 21:13:14 +00:00
|
|
|
.method public static b(Ljava/net/Socket;)Lokio/p;
|
2019-02-04 20:08:30 +00:00
|
|
|
.locals 2
|
|
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
|
|
value = {
|
|
|
|
Ljava/io/IOException;
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
if-eqz p0, :cond_1
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Ljava/net/Socket;->getOutputStream()Ljava/io/OutputStream;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
invoke-static {p0}, Lokio/j;->d(Ljava/net/Socket;)Lokio/a;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Ljava/net/Socket;->getOutputStream()Ljava/io/OutputStream;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
2019-02-27 21:13:14 +00:00
|
|
|
invoke-static {p0, v0}, Lokio/j;->a(Ljava/io/OutputStream;Lokio/r;)Lokio/p;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
new-instance v1, Lokio/a$1;
|
|
|
|
|
2019-02-27 21:13:14 +00:00
|
|
|
invoke-direct {v1, v0, p0}, Lokio/a$1;-><init>(Lokio/a;Lokio/p;)V
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
return-object v1
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
new-instance p0, Ljava/io/IOException;
|
|
|
|
|
|
|
|
const-string v0, "socket\'s output stream == null"
|
|
|
|
|
|
|
|
invoke-direct {p0, v0}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
throw p0
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
new-instance p0, Ljava/lang/IllegalArgumentException;
|
|
|
|
|
|
|
|
const-string v0, "socket == null"
|
|
|
|
|
|
|
|
invoke-direct {p0, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
throw p0
|
|
|
|
.end method
|
|
|
|
|
2019-02-27 21:13:14 +00:00
|
|
|
.method public static c(Ljava/net/Socket;)Lokio/q;
|
2019-02-04 20:08:30 +00:00
|
|
|
.locals 2
|
|
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
|
|
value = {
|
|
|
|
Ljava/io/IOException;
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
if-eqz p0, :cond_1
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Ljava/net/Socket;->getInputStream()Ljava/io/InputStream;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
invoke-static {p0}, Lokio/j;->d(Ljava/net/Socket;)Lokio/a;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Ljava/net/Socket;->getInputStream()Ljava/io/InputStream;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
2019-02-27 21:13:14 +00:00
|
|
|
invoke-static {p0, v0}, Lokio/j;->a(Ljava/io/InputStream;Lokio/r;)Lokio/q;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
new-instance v1, Lokio/a$2;
|
|
|
|
|
2019-02-27 21:13:14 +00:00
|
|
|
invoke-direct {v1, v0, p0}, Lokio/a$2;-><init>(Lokio/a;Lokio/q;)V
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
return-object v1
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
new-instance p0, Ljava/io/IOException;
|
|
|
|
|
|
|
|
const-string v0, "socket\'s input stream == null"
|
|
|
|
|
|
|
|
invoke-direct {p0, v0}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
throw p0
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
new-instance p0, Ljava/lang/IllegalArgumentException;
|
|
|
|
|
|
|
|
const-string v0, "socket == null"
|
|
|
|
|
|
|
|
invoke-direct {p0, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
throw p0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private static d(Ljava/net/Socket;)Lokio/a;
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
new-instance v0, Lokio/j$3;
|
|
|
|
|
|
|
|
invoke-direct {v0, p0}, Lokio/j$3;-><init>(Ljava/net/Socket;)V
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
.method public static v(Ljava/io/InputStream;)Lokio/q;
|
2019-02-04 20:08:30 +00:00
|
|
|
.locals 1
|
|
|
|
|
2019-02-27 21:13:14 +00:00
|
|
|
new-instance v0, Lokio/r;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-02-27 21:13:14 +00:00
|
|
|
invoke-direct {v0}, Lokio/r;-><init>()V
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-02-27 21:13:14 +00:00
|
|
|
invoke-static {p0, v0}, Lokio/j;->a(Ljava/io/InputStream;Lokio/r;)Lokio/q;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
.end method
|