public class GopherConnection extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_PORT
The default gopher port.
|
protected InputStream |
in |
protected OutputStream |
out |
protected Socket |
socket |
| Constructor and Description |
|---|
GopherConnection(String host)
Creates a new connection to the gopher server at the specified
hostname.
|
GopherConnection(String host,
int port)
Creates a new connection to the gopher server at the specified
hostname with the specified non-standard port.
|
| Modifier and Type | Method and Description |
|---|---|
InputStream |
get(String selector)
Returns the resource identified by the specified selector.
|
DirectoryListing |
list()
Returns the directory listing for this gopher server.
|
public static final int DEFAULT_PORT
protected Socket socket
protected InputStream in
protected OutputStream out
public GopherConnection(String host) throws IOException
hostname - the hostnameIOExceptionpublic GopherConnection(String host, int port) throws IOException
hostname - the hostnameport - the non-standard port to useIOExceptionpublic DirectoryListing list() throws IOException
IOExceptionpublic InputStream get(String selector) throws IOException
IOExceptionCopyright © 2017. All rights reserved.