111 lines
2.5 KiB
Smali
111 lines
2.5 KiB
Smali
.class public Lcom/fasterxml/jackson/databind/util/ByteBufferBackedInputStream;
|
|
.super Ljava/io/InputStream;
|
|
.source "ByteBufferBackedInputStream.java"
|
|
|
|
|
|
# instance fields
|
|
.field public final _b:Ljava/nio/ByteBuffer;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Ljava/nio/ByteBuffer;)V
|
|
.locals 0
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Ljava/io/InputStream;-><init>()V
|
|
|
|
iput-object p1, p0, Lcom/fasterxml/jackson/databind/util/ByteBufferBackedInputStream;->_b:Ljava/nio/ByteBuffer;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public available()I
|
|
.locals 1
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lcom/fasterxml/jackson/databind/util/ByteBufferBackedInputStream;->_b:Ljava/nio/ByteBuffer;
|
|
|
|
invoke-virtual {v0}, Ljava/nio/ByteBuffer;->remaining()I
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public read()I
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lcom/fasterxml/jackson/databind/util/ByteBufferBackedInputStream;->_b:Ljava/nio/ByteBuffer;
|
|
|
|
invoke-virtual {v0}, Ljava/nio/ByteBuffer;->hasRemaining()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/fasterxml/jackson/databind/util/ByteBufferBackedInputStream;->_b:Ljava/nio/ByteBuffer;
|
|
|
|
invoke-virtual {v0}, Ljava/nio/ByteBuffer;->get()B
|
|
|
|
move-result v0
|
|
|
|
and-int/lit16 v0, v0, 0xff
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, -0x1
|
|
|
|
:goto_0
|
|
return v0
|
|
.end method
|
|
|
|
.method public read([BII)I
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 2
|
|
iget-object v0, p0, Lcom/fasterxml/jackson/databind/util/ByteBufferBackedInputStream;->_b:Ljava/nio/ByteBuffer;
|
|
|
|
invoke-virtual {v0}, Ljava/nio/ByteBuffer;->hasRemaining()Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
const/4 p1, -0x1
|
|
|
|
return p1
|
|
|
|
.line 3
|
|
:cond_0
|
|
iget-object v0, p0, Lcom/fasterxml/jackson/databind/util/ByteBufferBackedInputStream;->_b: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 4
|
|
iget-object v0, p0, Lcom/fasterxml/jackson/databind/util/ByteBufferBackedInputStream;->_b:Ljava/nio/ByteBuffer;
|
|
|
|
invoke-virtual {v0, p1, p2, p3}, Ljava/nio/ByteBuffer;->get([BII)Ljava/nio/ByteBuffer;
|
|
|
|
return p3
|
|
.end method
|