public class SftpUrlConnection extends URLConnection
The default connection timeout is 30 seconds.
| Modifier and Type | Field and Description | 
|---|---|
static int | 
DEFAULT_TIMEOUT
The Constant default timeout in milliseconds. 
 | 
allowUserInteraction, connected, doInput, doOutput, ifModifiedSince, url, useCaches| Modifier | Constructor and Description | 
|---|---|
protected  | 
SftpUrlConnection(URL url)
Instantiates a new SFTP URL connection. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
connect()  | 
void | 
disconnect()
Disconnect. 
 | 
com.jcraft.jsch.ChannelSftp | 
getChannel()
Gets the channel. 
 | 
InputStream | 
getInputStream()  | 
protected String | 
getPath()
Gets the path. 
 | 
addRequestProperty, 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, getOutputStream, getPermission, getReadTimeout, getRequestProperties, getRequestProperty, getURL, getUseCaches, guessContentTypeFromName, guessContentTypeFromStream, setAllowUserInteraction, setConnectTimeout, setContentHandlerFactory, setDefaultAllowUserInteraction, setDefaultRequestProperty, setDefaultUseCaches, setDoInput, setDoOutput, setFileNameMap, setIfModifiedSince, setReadTimeout, setRequestProperty, setUseCaches, toStringpublic static final int DEFAULT_TIMEOUT
protected SftpUrlConnection(URL url)
url - the URLpublic void connect()
             throws IOException
connect in class URLConnectionIOExceptionpublic void disconnect()
                throws IOException
IOException - Signals that an I/O exception has occurred.public com.jcraft.jsch.ChannelSftp getChannel()
                                       throws IOException
IOExceptionpublic InputStream getInputStream() throws IOException
getInputStream in class URLConnectionIOExceptionprotected String getPath() throws SftpUrlException
SftpUrlException - the SFTP URL exceptionCopyright © 2020. All rights reserved.