83 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			Smali
		
	
	
	
	
	
			
		
		
	
	
			83 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			Smali
		
	
	
	
	
	
| .class final Lcom/google/protobuf/CodedOutputStream$NioHeapEncoder;
 | |
| .super Lcom/google/protobuf/CodedOutputStream$ArrayEncoder;
 | |
| .source "CodedOutputStream.java"
 | |
| 
 | |
| 
 | |
| # annotations
 | |
| .annotation system Ldalvik/annotation/EnclosingClass;
 | |
|     value = Lcom/google/protobuf/CodedOutputStream;
 | |
| .end annotation
 | |
| 
 | |
| .annotation system Ldalvik/annotation/InnerClass;
 | |
|     accessFlags = 0x19
 | |
|     name = "NioHeapEncoder"
 | |
| .end annotation
 | |
| 
 | |
| 
 | |
| # instance fields
 | |
| .field private final byteBuffer:Ljava/nio/ByteBuffer;
 | |
| 
 | |
| .field private initialPosition:I
 | |
| 
 | |
| 
 | |
| # direct methods
 | |
| .method public constructor <init>(Ljava/nio/ByteBuffer;)V
 | |
|     .locals 3
 | |
| 
 | |
|     .line 1
 | |
|     invoke-virtual {p1}, Ljava/nio/ByteBuffer;->array()[B
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     invoke-virtual {p1}, Ljava/nio/ByteBuffer;->arrayOffset()I
 | |
| 
 | |
|     move-result v1
 | |
| 
 | |
|     invoke-virtual {p1}, Ljava/nio/ByteBuffer;->position()I
 | |
| 
 | |
|     move-result v2
 | |
| 
 | |
|     add-int/2addr v2, v1
 | |
| 
 | |
|     .line 2
 | |
|     invoke-virtual {p1}, Ljava/nio/ByteBuffer;->remaining()I
 | |
| 
 | |
|     move-result v1
 | |
| 
 | |
|     .line 3
 | |
|     invoke-direct {p0, v0, v2, v1}, Lcom/google/protobuf/CodedOutputStream$ArrayEncoder;-><init>([BII)V
 | |
| 
 | |
|     .line 4
 | |
|     iput-object p1, p0, Lcom/google/protobuf/CodedOutputStream$NioHeapEncoder;->byteBuffer:Ljava/nio/ByteBuffer;
 | |
| 
 | |
|     .line 5
 | |
|     invoke-virtual {p1}, Ljava/nio/ByteBuffer;->position()I
 | |
| 
 | |
|     move-result p1
 | |
| 
 | |
|     iput p1, p0, Lcom/google/protobuf/CodedOutputStream$NioHeapEncoder;->initialPosition:I
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| 
 | |
| # virtual methods
 | |
| .method public flush()V
 | |
|     .locals 3
 | |
| 
 | |
|     .line 1
 | |
|     iget-object v0, p0, Lcom/google/protobuf/CodedOutputStream$NioHeapEncoder;->byteBuffer:Ljava/nio/ByteBuffer;
 | |
| 
 | |
|     iget v1, p0, Lcom/google/protobuf/CodedOutputStream$NioHeapEncoder;->initialPosition:I
 | |
| 
 | |
|     invoke-virtual {p0}, Lcom/google/protobuf/CodedOutputStream$ArrayEncoder;->getTotalBytesWritten()I
 | |
| 
 | |
|     move-result v2
 | |
| 
 | |
|     add-int/2addr v1, v2
 | |
| 
 | |
|     invoke-virtual {v0, v1}, Ljava/nio/ByteBuffer;->position(I)Ljava/nio/Buffer;
 | |
| 
 | |
|     return-void
 | |
| .end method
 |