public class SocketHttpConnection extends java.lang.Object implements HttpConnection
HttpConnection
.SocketHttpConnectionProvider
Modifier and Type | Field and Description |
---|---|
protected java.net.Socket |
socket |
Constructor and Description |
---|
SocketHttpConnection(java.net.Socket socket) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes connection.
|
java.io.InputStream |
getInputStream()
Returns connection input stream.
|
java.io.OutputStream |
getOutputStream()
Returns connection output stream.
|
java.net.Socket |
getSocket()
Returns
Socket used by this connection. |
void |
init()
Initializes http connection after socket is created.
|
void |
setTimeout(int milliseconds)
Sets the timeout for connections, in milliseconds.
|
public void init() throws java.io.IOException
HttpConnection
HttpConnection.setTimeout(int)
.init
in interface HttpConnection
java.io.IOException
public java.io.OutputStream getOutputStream() throws java.io.IOException
HttpConnection
getOutputStream
in interface HttpConnection
java.io.IOException
public java.io.InputStream getInputStream() throws java.io.IOException
HttpConnection
getInputStream
in interface HttpConnection
java.io.IOException
public void close()
HttpConnection
close
in interface HttpConnection
public void setTimeout(int milliseconds)
HttpConnection
setTimeout
in interface HttpConnection
public java.net.Socket getSocket()
Socket
used by this connection.Copyright © 2003-present Jodd Team