public class GopherURLConnection extends URLConnection
| Modifier and Type | Field and Description |
|---|---|
protected GopherConnection |
connection
The connection managing the protocol exchange.
|
allowUserInteraction, connected, doInput, doOutput, ifModifiedSince, url, useCaches| Constructor and Description |
|---|
GopherURLConnection(URL url)
Constructs a Gopher connection to the specified URL.
|
| Modifier and Type | Method and Description |
|---|---|
void |
connect()
Establishes the connection.
|
Object |
getContent() |
Object |
getContent(Class[] classes) |
InputStream |
getInputStream()
Returns an input stream that reads from this open connection.
|
OutputStream |
getOutputStream()
Returns an output stream that writes to this connection.
|
addRequestProperty, getAllowUserInteraction, getConnectTimeout, getContentEncoding, getContentLength, getContentLengthLong, getContentType, getDate, getDefaultAllowUserInteraction, getDefaultRequestProperty, getDefaultUseCaches, getDoInput, getDoOutput, getExpiration, getFileNameMap, getHeaderField, getHeaderField, getHeaderFieldDate, getHeaderFieldInt, getHeaderFieldKey, getHeaderFieldLong, getHeaderFields, getIfModifiedSince, getLastModified, getPermission, getReadTimeout, getRequestProperties, getRequestProperty, getURL, getUseCaches, guessContentTypeFromName, guessContentTypeFromStream, setAllowUserInteraction, setConnectTimeout, setContentHandlerFactory, setDefaultAllowUserInteraction, setDefaultRequestProperty, setDefaultUseCaches, setDoInput, setDoOutput, setFileNameMap, setIfModifiedSince, setReadTimeout, setRequestProperty, setUseCaches, toStringprotected GopherConnection connection
public GopherURLConnection(URL url)
url - the URLpublic void connect()
throws IOException
connect in class URLConnectionIOExceptionpublic InputStream getInputStream() throws IOException
getInputStream in class URLConnectionIOExceptionpublic OutputStream getOutputStream() throws IOException
getOutputStream in class URLConnectionIOExceptionpublic Object getContent() throws IOException
getContent in class URLConnectionIOExceptionpublic Object getContent(Class[] classes) throws IOException
getContent in class URLConnectionIOExceptionCopyright © 2017. All rights reserved.