|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xnap.net.HttpConnection
public class HttpConnection
This class provides a convenience wrapper for the
HttpURLConnection
class.
Constructor Summary | |
---|---|
HttpConnection()
Constructs a http connection. |
Method Summary | |
---|---|
void |
close()
Closes the connection. |
void |
connect(java.lang.String location)
Establishes a connection to location . |
void |
connect(java.net.URL url)
Establishes a connection to url . |
java.io.InputStream |
getInputStream()
Returns the associated input stream. |
java.lang.String |
nextLine()
Reads and returns the next line from the input stream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HttpConnection()
Method Detail |
---|
public void connect(java.net.URL url) throws java.io.IOException
url
.
url
- the url to connect to
java.io.IOException
- thrown if the connection failspublic void connect(java.lang.String location) throws java.io.IOException
location
.
location
- the url to connect to
java.io.IOException
- thrown if the connection failspublic void close()
public java.io.InputStream getInputStream() throws java.io.IOException
java.io.IOException
connect(URL)
public java.lang.String nextLine()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |