public class FTPURLConnection extends URLConnection
| Modifier and Type | Field and Description |
|---|---|
protected FTPConnection |
connection
The connection managing the protocol exchange.
|
protected int |
fileStructure |
protected boolean |
passive |
protected int |
representationType |
protected int |
transferMode |
allowUserInteraction, connected, doInput, doOutput, ifModifiedSince, url, useCaches| Constructor and Description |
|---|
FTPURLConnection(URL url)
Constructs an FTP connection to the specified URL.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addRequestProperty(String key,
String value) |
void |
connect()
Establishes the connection.
|
InputStream |
getInputStream()
Returns an input stream that reads from this open connection.
|
OutputStream |
getOutputStream()
Returns an output stream that writes to this connection.
|
Map |
getRequestProperties() |
String |
getRequestProperty(String key) |
void |
setDoInput(boolean doinput)
This connection supports doInput.
|
void |
setDoOutput(boolean dooutput)
This connection supports doOutput.
|
void |
setRequestProperty(String key,
String value) |
getAllowUserInteraction, getConnectTimeout, getContent, getContent, getContentEncoding, getContentLength, getContentLengthLong, getContentType, getDate, getDefaultAllowUserInteraction, getDefaultRequestProperty, getDefaultUseCaches, getDoInput, getDoOutput, getExpiration, getFileNameMap, getHeaderField, getHeaderField, getHeaderFieldDate, getHeaderFieldInt, getHeaderFieldKey, getHeaderFieldLong, getHeaderFields, getIfModifiedSince, getLastModified, getPermission, getReadTimeout, getURL, getUseCaches, guessContentTypeFromName, guessContentTypeFromStream, setAllowUserInteraction, setConnectTimeout, setContentHandlerFactory, setDefaultAllowUserInteraction, setDefaultRequestProperty, setDefaultUseCaches, setFileNameMap, setIfModifiedSince, setReadTimeout, setUseCaches, toStringprotected FTPConnection connection
protected boolean passive
protected int representationType
protected int fileStructure
protected int transferMode
public FTPURLConnection(URL url)
url - the URLpublic void connect()
throws IOException
connect in class URLConnectionIOExceptionpublic void setDoInput(boolean doinput)
setDoInput in class URLConnectionpublic void setDoOutput(boolean dooutput)
setDoOutput in class URLConnectionpublic InputStream getInputStream() throws IOException
getInputStream in class URLConnectionIOExceptionpublic OutputStream getOutputStream() throws IOException
getOutputStream in class URLConnectionIOExceptionpublic String getRequestProperty(String key)
getRequestProperty in class URLConnectionpublic Map getRequestProperties()
getRequestProperties in class URLConnectionpublic void setRequestProperty(String key, String value)
setRequestProperty in class URLConnectionpublic void addRequestProperty(String key, String value)
addRequestProperty in class URLConnectionCopyright © 2017. All rights reserved.