public class GopherConnection
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_PORT
The default gopher port.
|
protected java.io.InputStream |
in |
protected java.io.OutputStream |
out |
protected java.net.Socket |
socket |
| Constructor and Description |
|---|
GopherConnection(java.lang.String host)
Creates a new connection to the gopher server at the specified
hostname.
|
GopherConnection(java.lang.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 |
|---|---|
java.io.InputStream |
get(java.lang.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 java.net.Socket socket
protected java.io.InputStream in
protected java.io.OutputStream out
public GopherConnection(java.lang.String host)
throws java.io.IOException
hostname - the hostnamejava.io.IOExceptionpublic GopherConnection(java.lang.String host,
int port)
throws java.io.IOException
hostname - the hostnameport - the non-standard port to usejava.io.IOExceptionpublic DirectoryListing list() throws java.io.IOException
java.io.IOExceptionpublic java.io.InputStream get(java.lang.String selector)
throws java.io.IOException
java.io.IOException© Copyright 2003 The Free Software Foundation, all rights reserved