return -1;
}
try
{
FtpDataTransiver dataTransiver = clientSession.getDataTransiver();
if (dataTransiver != null)
{
for (int i = 0; i < 150; i++)
{
if (!dataTransiver.isConnected())
{
Thread.sleep(100);
}
}
}
if (path == null)
{
sendCommand(FtpConst.Commands.CMD_STOR);
return getReply();
}
sendCommand(String.format("%s %s", FtpConst.Commands.CMD_STOR, path));
int reply = getReply();
if (reply == FtpConst.Replyes.REPLY_125)
{
dataTransiver.send(fileContent);
reply = getReply();
}
return reply;
}
catch (Exception exc)