com.wizzardo.tools.http
Class Response
java.lang.Object
com.wizzardo.tools.http.Response
public class Response
- extends java.lang.Object
|
Constructor Summary |
protected |
Response(Request request,
java.net.HttpURLConnection connection)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
connection
protected java.net.HttpURLConnection connection
cookies
protected java.util.List<Cookie> cookies
request
protected Request request
Response
protected Response(Request request,
java.net.HttpURLConnection connection)
asString
public java.lang.String asString()
throws java.io.IOException
- Throws:
java.io.IOException
asBytes
public byte[] asBytes()
throws java.io.IOException
- Throws:
java.io.IOException
writeTo
public void writeTo(java.io.OutputStream out)
throws java.io.IOException
- Throws:
java.io.IOException
asStream
public java.io.InputStream asStream()
throws java.io.IOException
- Throws:
java.io.IOException
asString
public java.lang.String asString(java.lang.String charset)
throws java.io.IOException
- Throws:
java.io.IOException
getCookies
public java.util.List<Cookie> getCookies()
cookies
public java.util.List<Cookie> cookies()
request
public Request request()
getHeader
public java.lang.String getHeader(java.lang.String key)
getHeaders
public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getHeaders()
header
public java.lang.String header(java.lang.String key)
headerInt
public int headerInt(java.lang.String key,
int def)
headerLong
public long headerLong(java.lang.String key,
long def)
headerInt
public int headerInt(java.lang.String key)
headerLong
public java.lang.Long headerLong(java.lang.String key)
headers
public java.util.Map<java.lang.String,java.util.List<java.lang.String>> headers()
getResponseCode
public int getResponseCode()
throws java.io.IOException
- Throws:
java.io.IOException
getContentLength
public int getContentLength()
throws java.io.IOException
- Throws:
java.io.IOException