public class FTPSource extends URLSource implements ModifiableSource
| Modifier and Type | Class and Description |
|---|---|
private static class |
FTPSource.EnhancedFtpClient
Need to extend FtpClient in order to get to protected issueCommand
and implement additional functionality.
|
private static class |
FTPSource.FTPSourceOutputStream
Buffers the output in a byte array and only writes to the remote
FTP location at closing time.
|
| Modifier and Type | Field and Description |
|---|---|
private boolean |
m_isAscii |
avalonParameters, connectTimeout, m_cachedLastModificationDate, m_cachedValidity, m_connection, m_encoding, m_exists, m_isPost, m_mimeType, m_parameters, m_url, readTimeout| Constructor and Description |
|---|
FTPSource() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canCancel(java.io.OutputStream stream)
Can the data sent to an
OutputStream returned by
getOutputStream() be cancelled ? |
void |
cancel(java.io.OutputStream stream)
Cancel the data sent to an
OutputStream returned by
getOutputStream(). |
void |
delete()
Delete the source.
|
private FTPSource.EnhancedFtpClient |
getFtpClient()
Creates an FtpClient and logs in the current user.
|
protected void |
getInfos()
Get the last modification date and content length of the source.
|
java.io.OutputStream |
getOutputStream()
Return an
OutputStream to write to. |
private java.lang.String |
getPassword() |
private java.lang.String |
getUser() |
void |
init(java.net.URL url,
java.util.Map parameters)
Initialize a new object from a
URL. |
exists, getInputStream, getMimeType, getUserInfo, getValidity, parameterize, refreshcheckInfos, getContentLength, getLastModified, getScheme, getURI, setContentLength, setLastModified, setScheme, setSystemIdclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitexists, getContentLength, getInputStream, getLastModified, getMimeType, getScheme, getURI, getValidity, refreshpublic void init(java.net.URL url,
java.util.Map parameters)
throws java.io.IOException
URL.public boolean canCancel(java.io.OutputStream stream)
OutputStream returned by
getOutputStream() be cancelled ?canCancel in interface ModifiableSourcetrue if the stream can be cancelledpublic void cancel(java.io.OutputStream stream)
throws java.io.IOException
OutputStream returned by
getOutputStream().
After cancel, the stream should not be used.
cancel in interface ModifiableSourcejava.io.IOExceptionpublic void delete()
throws SourceException
delete in interface ModifiableSourceSourceExceptionprotected void getInfos()
public java.io.OutputStream getOutputStream()
throws java.io.IOException
OutputStream to write to.
The returned stream must be closed or cancelled by the calling code.getOutputStream in interface ModifiableSourcejava.io.IOExceptionprivate final FTPSource.EnhancedFtpClient getFtpClient() throws java.io.IOException
java.io.IOExceptionprivate final java.lang.String getUser()
null if there is no user info.private final java.lang.String getPassword()
null if there is no user info.