java.lang.Object
com.flexstor.common.io.xfile.ftp.FtpSession
- public class FtpSession
- extends java.lang.Object
|
Constructor Summary |
FtpSession(FtpSessionId sessionId)
Idea is that there should not be any other way to create a ftp session than
asking ftp session pool to create one. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
debug
private final boolean debug
- See Also:
- Constant Field Values
ANONYMOUS_USER
private static java.lang.String ANONYMOUS_USER
ANONYMOUS_PASSWD
private static java.lang.String ANONYMOUS_PASSWD
CR_LF
private static java.lang.String CR_LF
reader
private java.io.BufferedReader reader
writer
private java.io.BufferedWriter writer
ASCII_TYPE
public static final char ASCII_TYPE
- See Also:
- Constant Field Values
IMAGE_TYPE
public static final char IMAGE_TYPE
- See Also:
- Constant Field Values
EBCDIC_TYPE
public static final char EBCDIC_TYPE
- See Also:
- Constant Field Values
COMPRESSED_MODE
public static final char COMPRESSED_MODE
- See Also:
- Constant Field Values
STREAMING_MODE
public static final char STREAMING_MODE
- See Also:
- Constant Field Values
BLOCK_MODE
public static final char BLOCK_MODE
- See Also:
- Constant Field Values
in
private java.io.BufferedReader in
out
private java.io.BufferedWriter out
m_dataSocket
private java.net.ServerSocket m_dataSocket
NON_PRINT_FORMAT
public static final char NON_PRINT_FORMAT
- See Also:
- Constant Field Values
m_dataXfrSocket
private java.net.Socket m_dataXfrSocket
m_response
private FtpResponse m_response
isMacintosh
private boolean isMacintosh
ftpSessionId
protected FtpSessionId ftpSessionId
- An id that identifies a session.
bSessionTerminated
protected boolean bSessionTerminated
socket
protected java.net.Socket socket
bPassive
protected boolean bPassive
passiveSocket
protected java.net.Socket passiveSocket
FtpSession
public FtpSession(FtpSessionId sessionId)
- Idea is that there should not be any other way to create a ftp session than
asking ftp session pool to create one.
getSessionId
public FtpSessionId getSessionId()
connect
public void connect()
throws java.net.UnknownHostException,
java.io.IOException
transferMode
public void transferMode(char mode)
throws java.io.IOException
sendUserName
public void sendUserName(java.lang.String userName)
throws java.io.IOException
sendPassword
public void sendPassword(java.lang.String password)
throws java.io.IOException
readResponse
protected void readResponse()
changeWorkingDirectory
public void changeWorkingDirectory(java.lang.String path)
throws java.io.IOException
changeToParentDirectory
public void changeToParentDirectory()
throws java.io.IOException
logout
public void logout()
throws java.io.IOException
isSessionTerminated
public boolean isSessionTerminated()
dataPort
public void dataPort()
throws java.io.IOException,
java.net.UnknownHostException
representationType
public void representationType(char type)
throws java.io.IOException
representationType
public void representationType(char type,
char format)
throws java.io.IOException
retrieveBinary
public FtpInputStream retrieveBinary(java.lang.String path)
throws java.io.IOException
retrieve
public FtpReader retrieve(java.lang.String path)
throws java.io.IOException
store
public FtpWriter store(java.lang.String path)
throws java.io.IOException
storeBinary
public FtpOutputStream storeBinary(java.lang.String path)
throws java.io.IOException
append
public FtpWriter append(java.lang.String path)
throws java.io.IOException
renameFrom
public void renameFrom(java.lang.String path)
throws java.io.IOException
renameTo
public void renameTo(java.lang.String path)
throws java.io.IOException
delete
public void delete(java.lang.String path)
throws java.io.IOException
removeDirectory
public void removeDirectory(java.lang.String path)
throws java.io.IOException
makeDirectory
public void makeDirectory(java.lang.String path)
throws java.io.IOException
printWorkingDirectory
public void printWorkingDirectory()
throws java.io.IOException
listWithSpaces
private FtpReader listWithSpaces(java.lang.String path)
throws java.io.IOException
list
public FtpReader list(java.lang.String path)
throws java.io.IOException
list
public FtpReader list()
throws java.io.IOException
setResponse
void setResponse()
throws java.io.IOException
nameList
public FtpReader nameList(java.lang.String path)
throws java.io.IOException
nameList
public FtpReader nameList()
throws java.io.IOException
closeTransferSocket
void closeTransferSocket()
throws java.io.IOException
sendCommand
private void sendCommand(java.lang.String command)
throws java.io.IOException
getResponse
public FtpResponse getResponse()
createPassiveDataSocket
protected java.net.Socket createPassiveDataSocket()
throws java.io.IOException
getSocket
protected java.net.Socket getSocket()
throws java.io.IOException