2022-06-10 21:38:30 +09:00

118 lines
2.1 KiB
Smali

.class public Lj7/a;
.super Ljava/lang/Object;
.source "LineReader.java"
# instance fields
.field public a:Ljava/io/BufferedReader;
.field public b:Z
# direct methods
.method public constructor <init>(Ljava/io/BufferedReader;Z)V
.locals 0
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 2
iput-object p1, p0, Lj7/a;->a:Ljava/io/BufferedReader;
.line 3
iput-boolean p2, p0, Lj7/a;->b:Z
return-void
.end method
# virtual methods
.method public a()Ljava/lang/String;
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
iget-boolean v0, p0, Lj7/a;->b:Z
if-eqz v0, :cond_0
invoke-virtual {p0}, Lj7/a;->b()Ljava/lang/String;
move-result-object v0
goto :goto_0
:cond_0
iget-object v0, p0, Lj7/a;->a:Ljava/io/BufferedReader;
invoke-virtual {v0}, Ljava/io/BufferedReader;->readLine()Ljava/lang/String;
move-result-object v0
:goto_0
return-object v0
.end method
.method public final b()Ljava/lang/String;
.locals 3
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
new-instance v0, Ljava/lang/StringBuilder;
const/16 v1, 0x400
invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(I)V
.line 2
:goto_0
iget-object v1, p0, Lj7/a;->a:Ljava/io/BufferedReader;
invoke-virtual {v1}, Ljava/io/BufferedReader;->read()I
move-result v1
const/4 v2, -0x1
if-le v1, v2, :cond_0
const/16 v2, 0xa
if-eq v1, v2, :cond_0
int-to-char v1, v1
.line 3
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
goto :goto_0
.line 4
:cond_0
invoke-virtual {v0}, Ljava/lang/StringBuilder;->length()I
move-result v1
if-lez v1, :cond_1
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
goto :goto_1
:cond_1
const/4 v0, 0x0
:goto_1
return-object v0
.end method