115 lines
		
	
	
		
			3.7 KiB
		
	
	
	
		
			Smali
		
	
	
	
	
	
			
		
		
	
	
			115 lines
		
	
	
		
			3.7 KiB
		
	
	
	
		
			Smali
		
	
	
	
	
	
| .class public Lorg/apache/http/impl/io/HttpRequestParser;
 | |
| .super Lorg/apache/http/impl/io/AbstractMessageParser;
 | |
| .source "HttpRequestParser.java"
 | |
| 
 | |
| 
 | |
| # instance fields
 | |
| .field private final lineBuf:Lorg/apache/http/util/CharArrayBuffer;
 | |
| 
 | |
| .field private final requestFactory:Lorg/apache/http/HttpRequestFactory;
 | |
| 
 | |
| 
 | |
| # direct methods
 | |
| .method public constructor <init>(Lorg/apache/http/io/SessionInputBuffer;Lorg/apache/http/message/LineParser;Lorg/apache/http/HttpRequestFactory;Lorg/apache/http/params/HttpParams;)V
 | |
|     .locals 0
 | |
| 
 | |
|     .line 1
 | |
|     invoke-direct {p0, p1, p2, p4}, Lorg/apache/http/impl/io/AbstractMessageParser;-><init>(Lorg/apache/http/io/SessionInputBuffer;Lorg/apache/http/message/LineParser;Lorg/apache/http/params/HttpParams;)V
 | |
| 
 | |
|     if-eqz p3, :cond_0
 | |
| 
 | |
|     .line 2
 | |
|     iput-object p3, p0, Lorg/apache/http/impl/io/HttpRequestParser;->requestFactory:Lorg/apache/http/HttpRequestFactory;
 | |
| 
 | |
|     .line 3
 | |
|     new-instance p1, Lorg/apache/http/util/CharArrayBuffer;
 | |
| 
 | |
|     const/16 p2, 0x80
 | |
| 
 | |
|     invoke-direct {p1, p2}, Lorg/apache/http/util/CharArrayBuffer;-><init>(I)V
 | |
| 
 | |
|     iput-object p1, p0, Lorg/apache/http/impl/io/HttpRequestParser;->lineBuf:Lorg/apache/http/util/CharArrayBuffer;
 | |
| 
 | |
|     return-void
 | |
| 
 | |
|     .line 4
 | |
|     :cond_0
 | |
|     new-instance p1, Ljava/lang/IllegalArgumentException;
 | |
| 
 | |
|     const-string p2, "Request factory may not be null"
 | |
| 
 | |
|     invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
 | |
| 
 | |
|     throw p1
 | |
| .end method
 | |
| 
 | |
| 
 | |
| # virtual methods
 | |
| .method public parseHead(Lorg/apache/http/io/SessionInputBuffer;)Lorg/apache/http/HttpMessage;
 | |
|     .locals 2
 | |
|     .annotation system Ldalvik/annotation/Throws;
 | |
|         value = {
 | |
|             Ljava/io/IOException;,
 | |
|             Lorg/apache/http/HttpException;,
 | |
|             Lorg/apache/http/ParseException;
 | |
|         }
 | |
|     .end annotation
 | |
| 
 | |
|     .line 1
 | |
|     iget-object v0, p0, Lorg/apache/http/impl/io/HttpRequestParser;->lineBuf:Lorg/apache/http/util/CharArrayBuffer;
 | |
| 
 | |
|     invoke-virtual {v0}, Lorg/apache/http/util/CharArrayBuffer;->clear()V
 | |
| 
 | |
|     .line 2
 | |
|     iget-object v0, p0, Lorg/apache/http/impl/io/HttpRequestParser;->lineBuf:Lorg/apache/http/util/CharArrayBuffer;
 | |
| 
 | |
|     invoke-interface {p1, v0}, Lorg/apache/http/io/SessionInputBuffer;->readLine(Lorg/apache/http/util/CharArrayBuffer;)I
 | |
| 
 | |
|     move-result p1
 | |
| 
 | |
|     const/4 v0, -0x1
 | |
| 
 | |
|     if-eq p1, v0, :cond_0
 | |
| 
 | |
|     .line 3
 | |
|     new-instance p1, Lorg/apache/http/message/ParserCursor;
 | |
| 
 | |
|     const/4 v0, 0x0
 | |
| 
 | |
|     iget-object v1, p0, Lorg/apache/http/impl/io/HttpRequestParser;->lineBuf:Lorg/apache/http/util/CharArrayBuffer;
 | |
| 
 | |
|     invoke-virtual {v1}, Lorg/apache/http/util/CharArrayBuffer;->length()I
 | |
| 
 | |
|     move-result v1
 | |
| 
 | |
|     invoke-direct {p1, v0, v1}, Lorg/apache/http/message/ParserCursor;-><init>(II)V
 | |
| 
 | |
|     .line 4
 | |
|     iget-object v0, p0, Lorg/apache/http/impl/io/AbstractMessageParser;->lineParser:Lorg/apache/http/message/LineParser;
 | |
| 
 | |
|     iget-object v1, p0, Lorg/apache/http/impl/io/HttpRequestParser;->lineBuf:Lorg/apache/http/util/CharArrayBuffer;
 | |
| 
 | |
|     invoke-interface {v0, v1, p1}, Lorg/apache/http/message/LineParser;->parseRequestLine(Lorg/apache/http/util/CharArrayBuffer;Lorg/apache/http/message/ParserCursor;)Lorg/apache/http/RequestLine;
 | |
| 
 | |
|     move-result-object p1
 | |
| 
 | |
|     .line 5
 | |
|     iget-object v0, p0, Lorg/apache/http/impl/io/HttpRequestParser;->requestFactory:Lorg/apache/http/HttpRequestFactory;
 | |
| 
 | |
|     invoke-interface {v0, p1}, Lorg/apache/http/HttpRequestFactory;->newHttpRequest(Lorg/apache/http/RequestLine;)Lorg/apache/http/HttpRequest;
 | |
| 
 | |
|     move-result-object p1
 | |
| 
 | |
|     return-object p1
 | |
| 
 | |
|     .line 6
 | |
|     :cond_0
 | |
|     new-instance p1, Lorg/apache/http/ConnectionClosedException;
 | |
| 
 | |
|     const-string v0, "Client closed connection"
 | |
| 
 | |
|     invoke-direct {p1, v0}, Lorg/apache/http/ConnectionClosedException;-><init>(Ljava/lang/String;)V
 | |
| 
 | |
|     throw p1
 | |
| .end method
 |