StreamProcessor.smali
.class Lcom/facebook/imageutils/StreamProcessor;
.super Ljava/lang/Object;
.source "SourceFile"
# direct methods
.method constructor <init>()V
.registers 1
.line 16
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static readPackedInt(Ljava/io/InputStream;IZ)I
.registers 7
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
const/4 v0, 0x0
const/4 v1, 0x0
:goto_2
if-ge v0, p1, :cond_23
.line 30
invoke-virtual {p0}, Ljava/io/InputStream;->read()I
move-result v2
const/4 v3, -0x1
if-eq v2, v3, :cond_1b
if-eqz p2, :cond_13
and-int/lit16 v2, v2, 0xff
mul-int/lit8 v3, v0, 0x8
shl-int/2addr v2, v3
goto :goto_17
:cond_13
shl-int/lit8 v1, v1, 0x8
and-int/lit16 v2, v2, 0xff
:goto_17
or-int/2addr v1, v2
add-int/lit8 v0, v0, 0x1
goto :goto_2
.line 32
:cond_1b
new-instance p0, Ljava/io/IOException;
const-string p1, "no more bytes"
invoke-direct {p0, p1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
throw p0
:cond_23
return v1
.end method