Class HttpResponse
- java.lang.Object
-
- com.zing.zalo.zbrowser.downloader.HttpResponse
-
public class HttpResponse extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceHttpResponse.Callback
-
Field Summary
Fields Modifier and Type Field Description static intHTTP_RESP_BUFFER_SIZEHttpRequestrequest
-
Constructor Summary
Constructors Constructor Description HttpResponse(HttpRequest request)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringcheckRedirect()voidendOfResponse()HttpHeadergetHeaders()byte[]getRecvData()booleanparseHeader(byte[] data, HttpResponse.Callback callback)intreceive(SocketChannel socketChannel)voidreceiveData(ByteBuffer buf, HttpResponse.Callback callback)
-
-
-
Field Detail
-
HTTP_RESP_BUFFER_SIZE
public static final int HTTP_RESP_BUFFER_SIZE
- See Also:
- Constant Field Values
-
request
public final HttpRequest request
-
-
Constructor Detail
-
HttpResponse
public HttpResponse(HttpRequest request)
-
-
Method Detail
-
endOfResponse
public void endOfResponse()
-
checkRedirect
public String checkRedirect()
-
getRecvData
public byte[] getRecvData()
-
receive
public int receive(SocketChannel socketChannel) throws IOException
- Throws:
IOException
-
parseHeader
public boolean parseHeader(byte[] data, HttpResponse.Callback callback) throws Exception- Throws:
Exception
-
receiveData
public void receiveData(ByteBuffer buf, HttpResponse.Callback callback) throws IOException
- Throws:
IOException
-
getHeaders
public HttpHeader getHeaders()
-
-