Java org.apache.commons.httpclient HttpConnection fields, constructors, methods, implement or subclass

Example usage for Java org.apache.commons.httpclient HttpConnection fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.apache.commons.httpclient HttpConnection.

The text is from its open source code.

Subclass

org.apache.commons.httpclient.HttpConnection has subclasses.
Click this link to see all its subclasses.

Field

booleanisOpen
Whether or not the connection is connected.

Constructor

HttpConnection(HostConfiguration hostConfiguration)
Creates a new HTTP connection for the given host configuration.
HttpConnection(String host, int port)
Creates a new HTTP connection for the given host and port.
HttpConnection(String host, String virtualHost, int port, Protocol protocol)
Creates a new HTTP connection for the given host with the virtual alias and port using given protocol.
HttpConnection(String proxyHost, int proxyPort, String host, int port)
Creates a new HTTP connection for the given host and port via the given proxy host and port using the default protocol.
HttpConnection(String proxyHost, int proxyPort, String host, String virtualHost, int port, Protocol protocol)
Creates a new HTTP connection for the given host with the virtual alias and port via the given proxy host and port using the given protocol.
HttpConnection(String host, int port, Protocol protocol)
Creates a new HTTP connection for the given host and port using the given protocol.

Method

voidclose()
Closes the socket and streams.
voidflushRequestOutputStream()
Flushes the output request stream.
StringgetHost()
Returns the host.
InputStreamgetLastResponseInputStream()
Returns the stream used to read the last response's body.
InetAddressgetLocalAddress()
Return the local address used when creating the connection.
HttpConnectionParamsgetParams()
Returns HttpConnectionParams HTTP protocol parameters associated with this method.
intgetPort()
Returns the port of the host.
ProtocolgetProtocol()
Returns the protocol used to establish the connection.
StringgetProxyHost()
Returns the proxy host.
intgetProxyPort()
Returns the port of the proxy host.
OutputStreamgetRequestOutputStream()
Returns an OutputStream suitable for writing the request.
InputStreamgetResponseInputStream()
Return a InputStream suitable for reading the response.
booleanisTransparent()
Indicates if the connection is completely transparent from end to end.
voidopen()
Establishes a connection to the specified host and port (via a proxy if specified).
voidreleaseConnection()
Releases the connection.
voidsetConnectionTimeout(int timeout)
Sets the connection timeout.
voidsetHost(String host)
Sets the host to connect to.
voidsetHttpConnectionManager(HttpConnectionManager httpConnectionManager)
Sets the httpConnectionManager.
voidsetLastResponseInputStream(InputStream inStream)
Set the state to keep track of the last response for the last request.
voidsetLocalAddress(InetAddress localAddress)
Set the local address used when creating the connection.
voidsetParams(final HttpConnectionParams params)
Assigns HttpConnectionParams HTTP protocol parameters for this method.
voidsetPort(int port)
Sets the port to connect to.
voidsetProtocol(Protocol protocol)
Sets the protocol used to establish the connection
voidsetProxyHost(String host)
Sets the host to proxy through.
voidsetProxyPort(int port)
Sets the port of the host to proxy through.
voidsetSocketTimeout(int timeout)
Sets SO_TIMEOUT value directly on the underlying Socket socket .
voidsetSoTimeout(int timeout)
Set the Socket 's timeout, via Socket#setSoTimeout .
voidwrite(byte[] data)
Writes the specified bytes to the output stream.
voidwriteLine()
Writes "\r\n".getBytes() to the output stream.