808809810811812813814815816817818
String t = c.getTypeNow(); boolean ret = false; if(t.equals(FtpConnection.ASCII)) { ret = c.type(FtpConnection.BINARY); } else if(t.equals(FtpConnection.BINARY)) { ret = c.type(FtpConnection.EBCDIC); }
812813814815816817818819820821822
{ ret = c.type(FtpConnection.BINARY); } else if(t.equals(FtpConnection.BINARY)) { ret = c.type(FtpConnection.EBCDIC); } if(t.equals(FtpConnection.EBCDIC) || (!ret && !t.equals(FtpConnection.L8))) {
818819820821822823824825826827828
} if(t.equals(FtpConnection.EBCDIC) || (!ret && !t.equals(FtpConnection.L8))) { ret = c.type(FtpConnection.L8); } if(!ret) { c.type(FtpConnection.ASCII);
823824825826827828829830831832833
ret = c.type(FtpConnection.L8); } if(!ret) { c.type(FtpConnection.ASCII); Log.debug("Warning: type should be \"I\" if you want to transfer binary files!"); } Log.debug("Type is now " + c.getTypeNow()); }