|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--ServConnection
A class to handle a connection to an HTTP server.
| Field Summary | |
static int |
SOCKET_TIMEOUT
|
| Constructor Summary | |
ServConnection(java.net.InetAddress ia,
int port)
Create a new ServConnection to the given InetAddress and port. |
|
| Method Summary | |
boolean |
chunked()
Is this request chunked? |
void |
close()
Close the connection. |
long |
dataSize()
Get the size of the data being fetched. |
boolean |
equals(java.lang.Object o)
Compare this ServConnection against another object. |
java.io.InputStream |
getChunkStream()
Get the last chunked page. |
java.util.Date |
getInactiveTime()
Get the time that this ServConnection was Inactive. |
java.net.InetAddress |
getInetAddress()
Get the InetAddress that this ServConnection is connected to. |
HTTPInputStream |
getInputStream()
Get the InputStream. |
boolean |
getKeepAlive()
Get the keepalive value of this ServConnection. |
HTTPOutputStream |
getOutputStream()
Get the OutputStream of this ServConnection. |
int |
getPort()
Get the port number this ServConnection is connected to. |
void |
setInactive()
Mark this ServConnection as Inactive at current time. |
void |
setInactiveTime(java.util.Date d)
Mark this ServConnection as Inactive at given time. |
void |
writeHTTPHeader(HTTPHeader header)
Write an HTTP header on this connection. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static int SOCKET_TIMEOUT
| Constructor Detail |
public ServConnection(java.net.InetAddress ia,
int port)
throws java.io.IOException
InetAddress - theserver to connect to.port - the port number to connect to.| Method Detail |
public void close()
public java.net.InetAddress getInetAddress()
public int getPort()
public void setInactive()
public void setInactiveTime(java.util.Date d)
d - the time that this ServConnection is Inactive.public java.util.Date getInactiveTime()
public HTTPInputStream getInputStream()
public HTTPOutputStream getOutputStream()
public boolean getKeepAlive()
public long dataSize()
public boolean chunked()
public java.io.InputStream getChunkStream()
public void writeHTTPHeader(HTTPHeader header)
throws java.io.IOException
header - the Header to write.public boolean equals(java.lang.Object o)
equals in class java.lang.Objecto - the Object to compare against.
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||