org.jsoup.helper
Class HttpConnection.Response

java.lang.Object
  extended by org.jsoup.helper.HttpConnection.Response
All Implemented Interfaces:
Connection.Base<Connection.Response>, Connection.Response
Enclosing class:
HttpConnection

public static class HttpConnection.Response
extends Object
implements Connection.Response


Method Summary
 String body()
          Get the body of the response as a plain string.
 byte[] bodyAsBytes()
          Get the body of the response as an array of bytes.
 String charset()
          Get the character set name of the response.
 String contentType()
          Get the response content type (e.g.
 Document parse()
          Parse the body of the response as a Document.
 int statusCode()
          Get the status code of the response.
 String statusMessage()
          Get the status message of the response.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jsoup.Connection.Base
cookie, cookie, cookies, hasCookie, hasHeader, header, header, headers, method, method, removeCookie, removeHeader, url, url
 

Method Detail

statusCode

public int statusCode()
Description copied from interface: Connection.Response
Get the status code of the response.

Specified by:
statusCode in interface Connection.Response
Returns:
status code

statusMessage

public String statusMessage()
Description copied from interface: Connection.Response
Get the status message of the response.

Specified by:
statusMessage in interface Connection.Response
Returns:
status message

charset

public String charset()
Description copied from interface: Connection.Response
Get the character set name of the response.

Specified by:
charset in interface Connection.Response
Returns:
character set name

contentType

public String contentType()
Description copied from interface: Connection.Response
Get the response content type (e.g. "text/html");

Specified by:
contentType in interface Connection.Response
Returns:
the response content type

parse

public Document parse()
               throws IOException
Description copied from interface: Connection.Response
Parse the body of the response as a Document.

Specified by:
parse in interface Connection.Response
Returns:
a parsed Document
Throws:
IOException - on error

body

public String body()
Description copied from interface: Connection.Response
Get the body of the response as a plain string.

Specified by:
body in interface Connection.Response
Returns:
body

bodyAsBytes

public byte[] bodyAsBytes()
Description copied from interface: Connection.Response
Get the body of the response as an array of bytes.

Specified by:
bodyAsBytes in interface Connection.Response
Returns:
body bytes


Copyright © 2009-2012 Jonathan Hedley. All Rights Reserved.