|
Sun Adapter for Batch/FTP | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FtpFileProvider
This interface represents the Provider node in the FTP ETD structure. You can implement this interface to provide your own implementations. This class provides the core FTP feature and function interfaces.
Method Summary | |
---|---|
boolean |
appendFile(java.lang.String remoteFileName,
java.io.InputStream local)
Appends to a file onto the remote FTP server with the given file name, taking its input from the given InputStream. |
boolean |
appendFile(java.lang.String remoteFileName,
java.lang.String localFileName)
Appends to a file onto the remote FTP server with the given file name, taking its input from the given file name. |
boolean |
appendFile(java.lang.String remoteDirName,
java.lang.String remoteBaseFileName,
java.io.InputStream local)
Appends to a file onto the remote FTP server with the given file name, taking its input from the given InputStream. |
boolean |
appendFile(java.lang.String remoteDirName,
java.lang.String remoteBaseFileName,
java.lang.String localFileName)
Appends to a file onto the remote FTP server with the given directory and file name, taking its input from the given file name. |
java.io.OutputStream |
appendFileStream(java.lang.String remoteFileName)
Returns an OutputStream through which data can be written. |
java.io.OutputStream |
appendFileStream(java.lang.String dirName,
java.lang.String baseFileName)
Returns an OutputStream through which data can be written. |
boolean |
archiveFile(java.lang.String dirNameFrom,
java.lang.String baseFileNameFrom,
java.lang.String dirNameTo,
java.lang.String baseFileNameTo)
Renames a remote file. |
boolean |
ascii()
Sets the file type (to be transferred) to ASCII. |
boolean |
binary()
Sets the file type (to be transferred) to binary. |
boolean |
cd(java.lang.String dirName)
Changes the current working directory of the FTP session. |
boolean |
completePendingCommand()
Finishes the pending command. |
void |
connect(java.lang.String host,
int port)
Opens a socket connected to a remote FTP host at the specified port and originating from the current host at a system-assigned port. |
void |
connect(java.lang.String host,
int port,
java.lang.String encoding)
Opens a socket connected to a remote FTP host at the specified port and originating from the current host at a system-assigned port. |
boolean |
deleteFile(java.lang.String remoteFileName)
Deletes a file on the remote FTP server. |
boolean |
deleteFile(java.lang.String dirName,
java.lang.String baseFileName)
Deletes a file on the remote FTP server. |
void |
disConnect()
Closes the connection to the FTP server and restores the e*Way Connection parameters to the default values. |
boolean |
ebcdic()
Sets the file type (to be transferred) to EBCDIC. |
int |
getDataConnectionMode()
Returns the current data connection mode (one of the _DATA_CONNECTION_MODE constants), for example, PASSIVE or ACTIVE. |
java.lang.String |
getFirstFileName(java.lang.String dir,
boolean isDirRegex,
java.lang.String file,
boolean isFileRegex)
Gets the first matching remote file name based on the remote directory regular expression and remote file regular expression. |
FtpHeuristics |
getHeuristics()
Accessor - Get the FtpHeuristics object. |
int |
getReplyCode()
Returns the integer value of the reply code of the last FTP reply. |
java.lang.String |
getReplyString()
Returns the entire text of the last FTP server response exactly as it was received. |
java.lang.String[] |
getReplyStrings()
Returns the lines of text from the last FTP server response as an array of strings, one entry per line. |
int |
getSoLinger()
Returns the current SO_LINGER timeout (in seconds) of the currently opened socket. |
int |
getSoTimeout()
Returns the timeout, in milliseconds, of the currently opened socket. |
java.lang.String |
getSystemName()
Retrieves the system type name from the remote FTP server and returns the string. |
boolean |
getTcpNoDelay()
Allows you to determine whether Nagle's algorithm is enabled on the currently opened socket. |
boolean |
image()
Sets the file type of the file to be transferred, to "Image." |
void |
initialize(FtpETD etd)
Initializes the FTP ETD object. |
boolean |
isConnected()
Checks on whether the client is currently connected to a server. |
boolean |
isNegativePermanent(int replyCode)
Checks on whether the FTP operation is "Negative Permanent;" the return code can be any integer from 500 through 599. |
boolean |
isNegativeTransient(int replyCode)
Checks on whether the FTP operation is "Negative Transient;" the return code can be any integer from 400 through 499. |
boolean |
isPositiveCompletion(int replyCode)
Checks on whether the FTP operation is "Positive Completion;" the return code can be any integer from 200 through 299. |
boolean |
isPositiveIntermediate(int replyCode)
Checks on whether the FTP operation is "Positive Intermediate;" the return code can be any integer from 300 through 399. |
boolean |
isPositivePreliminary(int replyCode)
Checks on whether the FTP operation is "Positive Preliminary;" the return code can be any integer from 100 through 199. |
boolean |
isRemoteVerificationEnabled()
Allows you to determine whether verification of the remote FTP host participating in data connections is enabled. |
boolean |
isTraceRawCommand()
Check if the trace flag is on. |
java.lang.String[] |
listFileNames(com.oroinc.net.ftp.FTPFile[] files)
Gets the names of all file entries that are related to real file data. |
java.lang.String[] |
listFileNames(java.lang.String dir,
boolean isDirRegex,
java.lang.String file,
boolean isFileRegex)
Lists the remote full file names based on the remote directory regular expression and remote file regular expression. |
com.oroinc.net.ftp.FTPFile[] |
listFiles()
Using the default FileListParser , obtain a list of file information for the current working directory. |
com.oroinc.net.ftp.FTPFile[] |
listFiles(com.oroinc.net.ftp.FTPFile[] files,
boolean listRealData)
Gets all file entries that can be used to get real data, when the parameter listRealData is true. |
com.oroinc.net.ftp.FTPFile[] |
listFiles(com.oroinc.net.ftp.FTPFile[] files,
int fileType)
Filters files by type. |
com.oroinc.net.ftp.FTPFile[] |
listFiles(java.lang.String pathName)
Using the default FileListParser, obtains a list of file information for the given working directory. |
com.oroinc.net.ftp.FTPFile[] |
listFiles(java.lang.String pathName,
java.lang.String regExp)
Using default FileListParser, obtains a list of file information for the given working directory and regular expression. |
java.lang.String |
listHelp()
Retrieves the system help information from the remote FTP server and returns the full string. |
java.lang.String |
listHelp(java.lang.String command)
Retrieves the help information for a given command from the remote FTP server and returns the full string. |
boolean |
login(java.lang.String user,
java.lang.String password)
Logs into the remote FTP server using the provided user name and password. |
boolean |
logout()
Logs out of the remote FTP server by sending the QUIT command. |
boolean |
mkdir(java.lang.String dir)
Creates a new directory if the directory does not exist. |
boolean |
mkdirs(java.lang.String dir)
Creates a new directory if the directory does not exist. |
java.lang.String |
pwd()
Returns the path name of the current working directory. |
boolean |
rename(java.lang.String remoteFileNameFrom,
java.lang.String remoteFileNameTo)
Renames a remote file. |
boolean |
rename(java.lang.String dirNameFrom,
java.lang.String baseFileNameFrom,
java.lang.String dirNameTo,
java.lang.String baseFileNameTo)
Renames a remote file. |
boolean |
retrieveFile(java.lang.String remoteFileName,
java.io.OutputStream local)
Retrieves a named file from the remote FTP server and writes it to the given OutputStream. |
boolean |
retrieveFile(java.lang.String remoteFileName,
java.lang.String localFileName)
Retrieves a named file from the remote FTP server and writes it to the given local file. |
boolean |
retrieveFile(java.lang.String remoteDirName,
java.lang.String remoteBaseFileName,
java.io.OutputStream local)
Retrieves a named file from the remote FTP server and writes it to the given OutputStream. |
boolean |
retrieveFile(java.lang.String remoteDirName,
java.lang.String remoteBaseFileName,
java.lang.String localFileName)
Retrieves a named file from the remote FTP server and writes it to the given local file. |
java.io.InputStream |
retrieveFileStream(java.lang.String remoteFileName)
Returns an InputStream from which a named file from the remote FTP server can be read. |
java.io.InputStream |
retrieveFileStream(java.lang.String dirName,
java.lang.String baseFileName)
Returns an InputStream from which a named file from the remote FTP server can be read. |
boolean |
rmdir(java.lang.String dirName)
Removes a directory on the remote FTP server, if it is empty. |
int |
sendCommand(java.lang.String command)
Sends an FTP command without a parameter to the server. |
int |
sendCommand(java.lang.String command,
java.lang.String parm)
Sends an FTP command to the server. |
boolean |
sendSiteCommand(java.lang.String command)
send a site command to FTP server |
void |
setDataSocketTimeout(int timeout)
Sets the timeout, in milliseconds, to use when reading from the data connection. |
void |
setDirListingStyle(java.lang.String dirListingStyle)
Initializes and update the FTP heuristics using the specified directory listing style. |
void |
setRemoteVerificationEnabled(boolean enable)
Allows you to enable or disable verification that the remote FTP host taking part in a given data connection is the same as the host to which the control connection is attached. |
void |
setSocketFactory(com.oroinc.net.SocketFactory factory)
Sets the SocketFactory used by the SocketClient to open socket connections. |
void |
setSoLinger(boolean on,
int val)
Sets the SO_LINGER timeout (in seconds) on the currently opened command socket. |
void |
setSoTimeout(int timeout)
Sets the timeout, in milliseconds, of a currently open command connection. |
void |
setTcpNoDelay(boolean on)
Allows you to enable or disable the Nagle's algorithm (TCP_NODELAY) on the currently opened command socket. |
void |
setTraceRawCommand(boolean newTraceRawCommand)
Allows you to turn the trace flag on or off. |
void |
setUserDefinedHeuristicsInfo(java.lang.String userDirListingStyle,
java.lang.String userHeuristicsCfgFile)
initialize and update the FTP heuristics using the specified user defined heuristics information; |
boolean |
storeFile(java.lang.String remoteFileName,
java.io.InputStream local)
Stores a file on the server using the given name and takes input from the given InputStream. |
boolean |
storeFile(java.lang.String remoteFileName,
java.lang.String localFileName)
Stores a file on the remote FTP server using the given name and takes input from the given local file. |
boolean |
storeFile(java.lang.String remoteDirName,
java.lang.String remoteBaseFileName,
java.io.InputStream local)
Stores a file on the server using the given name and takes input from the given InputStream. |
boolean |
storeFile(java.lang.String remoteDirName,
java.lang.String remoteBaseFileName,
java.lang.String localFileName)
Stores a file on the remote FTP server using the given name and takes input from the given local file. |
java.io.OutputStream |
storeFileStream(java.lang.String remoteFileName)
Returns an OutputStream through which data can be written to store a file on the server using the given name. |
java.io.OutputStream |
storeFileStream(java.lang.String dirName,
java.lang.String baseFileName)
Returns an OutputStream through which data can be written to store a file on the server using the given name. |
void |
useActive()
Sets the current data connection mode to ACTIVE_LOCAL_DATA_CONNECTION_MODE. |
void |
usePassive()
Sest the current data connection mode to PASSIVE_LOCAL_DATA_CONNECTION_MODE. |
Method Detail |
---|
boolean appendFile(java.lang.String remoteFileName, java.lang.String localFileName) throws java.io.IOException
remoteFileName
- The remote file name.localFileName
- The local file name.
java.io.IOException
- If some error occurs.boolean appendFile(java.lang.String remoteDirName, java.lang.String remoteBaseFileName, java.lang.String localFileName) throws java.io.IOException
remoteDirName
- The remote directory name.remoteBaseFileName
- The remote base file name.localFileName
- The local file name.
java.io.IOException
- If some error occurs.boolean appendFile(java.lang.String remoteFileName, java.io.InputStream local) throws java.io.IOException
remoteFileName
- The remote file name.local
- The local input stream.
java.io.IOException
- If some error occurs.boolean appendFile(java.lang.String remoteDirName, java.lang.String remoteBaseFileName, java.io.InputStream local) throws java.io.IOException
remoteFileName
- The remote file name.local
- The local input stream.
java.io.IOException
- If some error occurs.java.io.OutputStream appendFileStream(java.lang.String remoteFileName) throws java.io.IOException
remoteFileName
- The remote file name.
java.io.IOException
- If some error occurs.java.io.OutputStream appendFileStream(java.lang.String dirName, java.lang.String baseFileName) throws java.io.IOException
remoteFileName
- The remote file name.baseFileName
- The remote base file name.
java.io.IOException
- If some error occurs.boolean archiveFile(java.lang.String dirNameFrom, java.lang.String baseFileNameFrom, java.lang.String dirNameTo, java.lang.String baseFileNameTo) throws java.io.IOException
dirNameFrom
- The old remote directory name.baseFileNameFrom
- The old remote base file name.dirNameTo
- The new remote directory name.baseFileNameTo
- The new remote base file name.
java.io.IOException
- If some error occurs.boolean ascii() throws java.io.IOException
java.io.IOException
- If some error occurs.boolean binary() throws java.io.IOException
java.io.IOException
- If some error occurs.boolean cd(java.lang.String dirName) throws java.io.IOException
dirName
- The new directory name.
java.io.IOException
- If some error occurs.boolean completePendingCommand() throws java.io.IOException
java.io.IOException
- If some error occurs.void connect(java.lang.String host, int port) throws java.net.SocketException, java.io.IOException
host
- The FTP host name.port
- The FTP server port.
java.net.SocketException
- If some socket error occurs.
java.io.IOException
- If some IO error occurs.void connect(java.lang.String host, int port, java.lang.String encoding) throws java.net.SocketException, java.io.IOException
host
- The FTP host name.port
- The FTP server port.encoding
- The encoding for the server.
java.net.SocketException
- If some socket error occurs.
java.io.IOException
- If some IO error occurs.boolean deleteFile(java.lang.String remoteFileName) throws java.io.IOException
remoteFileName
- The remote file name to be deleted.
java.io.IOException
- If some error occurs.boolean deleteFile(java.lang.String dirName, java.lang.String baseFileName) throws java.io.IOException
dirName
- The remote directory name of the file.baseFileName
- The base name of the file.
java.io.IOException
- If some error occurs.void disConnect() throws java.io.IOException
java.io.IOException
- If some error occurs.boolean ebcdic() throws java.io.IOException
java.io.IOException
- If some error occurs.int getDataConnectionMode()
FtpHeuristics getHeuristics()
int getReplyCode()
java.lang.String getReplyString()
java.lang.String[] getReplyStrings()
int getSoLinger() throws java.net.SocketException
java.net.SocketException
- If the operation fails.int getSoTimeout() throws java.net.SocketException
java.net.SocketException
- If the operation fails.java.lang.String getSystemName() throws java.io.IOException
java.io.IOException
- If some error occurs.boolean getTcpNoDelay() throws java.net.SocketException
java.net.SocketException
- If the operation fails.boolean image() throws java.io.IOException
java.io.IOException
- If some error occurs.void initialize(FtpETD etd) throws FtpFileException
etd
- The FTP ETD instance.
FtpFileException
- If some error occurs.boolean isConnected()
boolean isNegativePermanent(int replyCode)
replyCode
- The reply code of the FTP operation.
boolean isNegativeTransient(int replyCode)
replyCode
- The reply code of the FTP operation.
boolean isPositiveCompletion(int replyCode)
replyCode
- The reply code of the FTP operation.
boolean isPositiveIntermediate(int replyCode)
replyCode
- The reply code of the FTP operation.
boolean isPositivePreliminary(int replyCode)
replyCode
- The reply code of the FTP operation.
boolean isRemoteVerificationEnabled()
boolean isTraceRawCommand()
java.lang.String[] listFileNames(com.oroinc.net.ftp.FTPFile[] files) throws java.io.IOException
files
- An array of FTPFile objects.
java.io.IOException
- If some error occurs.com.oroinc.net.ftp.FTPFile[] listFiles() throws java.io.IOException
java.io.IOException
- If some error occurs.com.oroinc.net.ftp.FTPFile[] listFiles(com.oroinc.net.ftp.FTPFile[] files, int fileType) throws java.io.IOException
files
- An array of FTPFile objects.fileType
- The file type.
java.io.IOException
- If some error occurs.com.oroinc.net.ftp.FTPFile[] listFiles(com.oroinc.net.ftp.FTPFile[] files, boolean listRealData) throws java.io.IOException
files
- An array of FTPFile objects.listRealData
- Indicates whether the files listed contain real data.
java.io.IOException
- If some error occurs.com.oroinc.net.ftp.FTPFile[] listFiles(java.lang.String pathName) throws java.io.IOException
pathName
- The directory name.
java.io.IOException
- If some error occurs.com.oroinc.net.ftp.FTPFile[] listFiles(java.lang.String pathName, java.lang.String regExp) throws java.io.IOException
pathName
- The directory name.regExp
- The file name regular expression.
java.io.IOException
- If some error occurs.java.lang.String listHelp() throws java.io.IOException
java.io.IOException
- If some error occurs.java.lang.String listHelp(java.lang.String command) throws java.io.IOException
command
- The command given.
java.io.IOException
- If some error occurs.boolean login(java.lang.String user, java.lang.String password) throws java.io.IOException
user
- The user name.password
- The password.
java.io.IOException
- If some error occurs.boolean logout() throws java.io.IOException
java.io.IOException
- If some error occurs.boolean mkdir(java.lang.String dir) throws java.io.IOException
dir
- The directory name to be created.
java.io.IOException
- If some error occurs.boolean mkdirs(java.lang.String dir) throws java.io.IOException
dir
- The directory name to be created.
java.io.IOException
- If some error occurs.java.lang.String pwd() throws java.io.IOException
java.io.IOException
- If some error occurs.boolean rename(java.lang.String remoteFileNameFrom, java.lang.String remoteFileNameTo) throws java.io.IOException
remoteFileNameFrom
- The old remote file name.remoteFileNameTo
- The new remote file name.
java.io.IOException
- If some error occurs.boolean rename(java.lang.String dirNameFrom, java.lang.String baseFileNameFrom, java.lang.String dirNameTo, java.lang.String baseFileNameTo) throws java.io.IOException
dirNameFrom
- The old remote directory name.baseFileNameFrom
- The old remote base file name.dirNameTo
- The new remote directory name.baseFileNameTo
- The new remote base file name.
java.io.IOException
- If some error occurs.boolean retrieveFile(java.lang.String remoteFileName, java.lang.String localFileName) throws java.io.IOException
remoteFileName
- The remote file name.localFileName
- The local file name.
java.io.IOException
- If some error occurs.boolean retrieveFile(java.lang.String remoteDirName, java.lang.String remoteBaseFileName, java.lang.String localFileName) throws java.io.IOException
remoteDirName
- The remote directory name.remoteBaseFileName
- The remote base file name.localFileName
- The local file name.
java.io.IOException
- If some error occurs.boolean retrieveFile(java.lang.String remoteFileName, java.io.OutputStream local) throws java.io.IOException
remoteFileName
- The remote file name.local
- The local output stream.
java.io.IOException
- If some error occurs.boolean retrieveFile(java.lang.String remoteDirName, java.lang.String remoteBaseFileName, java.io.OutputStream local) throws java.io.IOException
remoteDirName
- The remote directory name.remoteBaseFileName
- The remote base file name.local
- The local output stream.
java.io.IOException
- If some error occurs.java.io.InputStream retrieveFileStream(java.lang.String remoteFileName) throws java.io.IOException
remoteFileName
- The remote file name.
java.io.IOException
- If some error occurs.java.io.InputStream retrieveFileStream(java.lang.String dirName, java.lang.String baseFileName) throws java.io.IOException
dirName
- The remote directory name.baseFileName
- The remote base file name.
java.io.IOException
- If some error occurs.boolean rmdir(java.lang.String dirName) throws java.io.IOException
dirName
- The name of the remote directory to remove.
java.io.IOException
- If some error occurs.int sendCommand(java.lang.String command) throws java.io.IOException
command
- The FTP command to be executed.
java.io.IOException
- If some error occurs.int sendCommand(java.lang.String command, java.lang.String parm) throws java.io.IOException
command
- The FTP command to be executed.parm
- The parameter of the FTP command.
java.io.IOException
- If some error occurs.boolean sendSiteCommand(java.lang.String command) throws java.io.IOException
command
- - site command
java.io.IOException
void setDataSocketTimeout(int timeout)
timeout
- The timeout, in milliseconds, that is used when
opening a data connection socket.void setRemoteVerificationEnabled(boolean enable)
enable
- true enables verification, and false disables it.void setSocketFactory(com.oroinc.net.SocketFactory factory)
factory
- The new SocketFactory the SocketClient must use.void setSoLinger(boolean on, int val) throws java.net.SocketException
on
- true if the timeout is to be enabled, and false if not.val
- The timeout in seconds (in hundredths of a second?)
java.net.SocketException
- If the operation fails.void setSoTimeout(int timeout) throws java.net.SocketException
timeout
- The timeout, in milliseconds, to use for the currently
open command connection socket.
java.net.SocketException
- If the operation fails.void setTcpNoDelay(boolean on) throws java.net.SocketException
on
- true to enable Nagle's algorithm, and false to disable.
java.net.SocketException
- If the operation fails.void setTraceRawCommand(boolean newTraceRawCommand)
newTraceRawCommand
- true or false.boolean storeFile(java.lang.String remoteFileName, java.lang.String localFileName) throws java.io.IOException
remoteFileName
- The remote file name.localFileName
- The local file name.
java.io.IOException
- If some error occurs.boolean storeFile(java.lang.String remoteDirName, java.lang.String remoteBaseFileName, java.lang.String localFileName) throws java.io.IOException
remoteDirName
- The remote directory name.remoteBaseFileName
- The remote file name.localFileName
- The local file name.
java.io.IOException
- If some error occurs.boolean storeFile(java.lang.String remoteFileName, java.io.InputStream local) throws java.io.IOException
remoteFileName
- The remote file name.local
- The local input stream.
java.io.IOException
- If some error occurs.boolean storeFile(java.lang.String remoteDirName, java.lang.String remoteBaseFileName, java.io.InputStream local) throws java.io.IOException
remoteDirName
- The remote directory name.remoteBaseFileName
- The remote file name.local
- The local input stream.
java.io.IOException
- If some error occurs.java.io.OutputStream storeFileStream(java.lang.String remoteFileName) throws java.io.IOException
remoteFileName
- The remote file name.
java.io.IOException
- If some error occurs.java.io.OutputStream storeFileStream(java.lang.String dirName, java.lang.String baseFileName) throws java.io.IOException
dirName
- The remote directory name.baseFileName
- The remote base file name.
java.io.IOException
- If some error occurs.void useActive()
void usePassive()
java.lang.String getFirstFileName(java.lang.String dir, boolean isDirRegex, java.lang.String file, boolean isFileRegex) throws java.io.IOException
dir
- The directory name.isDirRegex
- Tells whether the directory name is a regular expression.file
- The file name.isFileRegex
- Tells whether the file name is a regular expression.
java.io.IOException
- If some error occurs.java.lang.String[] listFileNames(java.lang.String dir, boolean isDirRegex, java.lang.String file, boolean isFileRegex) throws java.io.IOException
dir
- The directory name.isDirRegex
- Tells whether the directory name is a regular expression.file
- The file name.isFileRegex
- Tells whether the file name is a regular expression.
java.io.IOException
- If some error occurs.void setUserDefinedHeuristicsInfo(java.lang.String userDirListingStyle, java.lang.String userHeuristicsCfgFile) throws java.lang.Exception
userDirListingStyle
- - the name of the user defined directory listing style
must be the name of the an entry in the user defined heuristics configuration file - as
specified by userHeuristicsCfgFile
userHeuristicsCfgFile
- - a path pointing to the user defined heuristics configuration file;
java.lang.Exception
void setDirListingStyle(java.lang.String dirListingStyle) throws java.lang.Exception
dirListingStyle
- The directory listing style.
java.lang.Exception
- If some error occurs.
|
Sun Adapter for Batch/FTP | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |