public class IfsProtocolClientChannel extends Object
Modifier and Type | Field and Description |
---|---|
protected BaseMain |
m_BaseMain
If the user wishes to get Cc'd on the replies
|
protected boolean |
m_BinaryTransfer
transfer mode (bin or ascii)
|
protected byte[] |
m_Buff
instance buffer for data transfers
|
protected boolean |
m_Connected
Are we connected?
|
protected Socket |
m_ControlSocket
used for control messages (non-data)
|
protected PrintWriter |
m_ControlStream
control messages are sent on this stream
|
protected Socket |
m_DataSocket
data socket
|
protected InetAddress |
m_ftpHost
address of data socketServer
|
protected boolean |
m_ReissuePassiveModeCommand
should we re-issue PASV for every new data transfer?
|
protected int |
m_remotePort
port of data socketServer
|
protected BufferedReader |
m_ReplyStream
control replies are received on this stream
|
protected String |
m_ServerName
For re-connect: what was the server?
|
protected int |
m_ServerPort
For re-connect: what was the port?
|
static int |
REPLY_STATUS_ERROR |
static int |
REPLY_STATUS_INCOMPLETE |
static int |
REPLY_STATUS_NOOP |
static int |
REPLY_STATUS_SUCCESS |
static int |
s_TransferBufferSize
size of the content transfer buffer
|
Constructor and Description |
---|
IfsProtocolClientChannel()
default constructor
|
public static final int REPLY_STATUS_INCOMPLETE
public static final int REPLY_STATUS_SUCCESS
public static final int REPLY_STATUS_NOOP
public static final int REPLY_STATUS_ERROR
public static final int s_TransferBufferSize
protected boolean m_ReissuePassiveModeCommand
protected Socket m_ControlSocket
protected PrintWriter m_ControlStream
protected BufferedReader m_ReplyStream
protected BaseMain m_BaseMain
protected boolean m_BinaryTransfer
protected byte[] m_Buff
protected Socket m_DataSocket
protected InetAddress m_ftpHost
protected int m_remotePort
protected boolean m_Connected
protected String m_ServerName
protected int m_ServerPort
public void setLogger(BaseMain logger)
public void setReissuePassiveModeCommand(boolean mode)
public void connect(String hostname) throws IOException, UnknownHostException
IOException
UnknownHostException
public void connect(String hostname, int port) throws IOException, UnknownHostException
IOException
UnknownHostException
public void disconnect() throws IOException, Exception
IOException
Exception
public void reset()
public void releaseSockets() throws IOException
IOException
public String invokeControlOnlyCommand(String command) throws Exception
Exception
public String invokeMultiLineTextResultCommand(String command, IfsProtocolClientCallback writer) throws Exception, IOException
Exception
IOException
public String getFile(String path) throws IOException, Exception
IOException
Exception
public String getFile(String remotePath, String localPath) throws IOException, Exception
IOException
Exception
public String putFile(String path) throws IOException, Exception
IOException
Exception
public String putFile(String localPath, String remotePath) throws Exception, IOException
Exception
IOException
protected int transferContent(InputStream iss, OutputStream os) throws IOException
IOException
protected void openDataConnection() throws Exception, IOException
Exception
IOException
protected Socket getDataSocket()
public String checkReply() throws IOException
IOException
public String checkReply(boolean returnOnPreliminaryReply) throws IOException
IOException
public int getReplyStatus(String reply)
public void log(String msg)
public void traceTime(String msg)
Copyright © 2023. All rights reserved.